foo.cc: In function 'void dfs(int, int, int)':
foo.cc:9:27: error: 'max' was not declared in this scope
ans = max(ans,tans);
^
foo.cc:9:27: note: suggested alternative:
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from foo.cc:2:
/usr/include/c++/6/bits/stl_algobase.h:265:5: note: 'std::max'
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
foo.cc: In function 'int main()':
foo.cc:16:5: error: 'cin' was not declared in this scope
cin >> t >> n;
^~~
foo.cc:16:5: note: suggested alternative:
In file included from foo.cc:2:0:
/usr/include/c++/6/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^~~
foo.cc:20:5: error: 'cout' was not declared in this scope
cout << ans << endl;
^~~~
foo.cc:20:5: note: suggested alternative:
In file included from foo.cc:2:0:
/usr/include/c++/6/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~
foo.cc:20:20: error: 'endl' was not declared in this scope
cout << ans << endl;
^~~~
foo.cc:20:20: note: suggested alternative:
In file included from /usr/include/c++/6/iostream:39:0,
from foo.cc:2:
/usr/include/c++/6/ostream:590:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^~~~
自豪的采用jd5进行评测(github.com/masnn/jd5)