foo.cc:4:1: error: 'string' does not name a type; did you mean 'stdin'?
string a;
^~~~~~
stdin
foo.cc: In function 'int main()':
foo.cc:8:2: error: 'cin' was not declared in this scope
cin >> a;
^~~
foo.cc:8:2: note: suggested alternative:
In file included from foo.cc:1:0:
/usr/include/c++/7/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^~~
foo.cc:8:9: error: 'a' was not declared in this scope
cin >> a;
^
foo.cc:15:10: error: 'max' was not declared in this scope
maxx = max(maxx,b[i]);
^~~
foo.cc:15:10: note: suggested alternative:
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: 'std::max'
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
foo.cc:16:10: error: 'min' was not declared in this scope
minn = min(minn,b[i]);
^~~
foo.cc:16:10: note: suggested alternative:
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: 'std::min'
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
foo.cc:20:2: error: expected ',' or ';' before 'for'
for(int i=2;i<h;i++){
^~~
foo.cc:20:14: error: 'i' was not declared in this scope
for(int i=2;i<h;i++){
^
foo.cc:27:3: error: 'cout' was not declared in this scope
cout << "No Answer" << endl;
^~~~
foo.cc:27:3: note: suggested alternative:
In file included from foo.cc:1:0:
/usr/include/c++/7/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~
foo.cc:27:26: error: 'endl' was not declared in this scope
cout << "No Answer" << endl;
^~~~
foo.cc:27:26: note: suggested alternative:
In file included from /usr/include/c++/7/iostream:39:0,
from foo.cc:1:
/usr/include/c++/7/ostream:590:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^~~~
foo.cc:31:3: error: 'cout' was not declared in this scope
cout << "Lucky Word" << endl;
^~~~
foo.cc:31:3: note: suggested alternative:
In file included from foo.cc:1:0:
/usr/include/c++/7/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~
foo.cc:31:27: error: 'endl' was not declared in this scope
cout << "Lucky Word" << endl;
^~~~
foo.cc:31:27: note: suggested alternative:
In file included from /usr/include/c++/7/iostream:39:0,
from foo.cc:1:
/usr/include/c++/7/ostream:590:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^~~~
[Hydro](https://hydro.ac)提供评测服务