Language: C++

#include <bits/stdc++.h>
std::vector<int>e[1<<17],o(1<<17,0);void d(int w){if(!o[w])for(auto x:e[w])d(x),o[w]=max(o[w],o[x]+1);}main(){int a=0,u,v,n,m;scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&u,&v);,e[u].push_back(v);for(;m++<n;)d(m),a=max(a,o[m]);cout<<a;}


Compiler output:
a.cc: In function 'void d(int)':
a.cc:2:86: error: 'max' was not declared in this scope; did you mean 'std::max'?
    2 | std::vector<int>e[1<<17],o(1<<17,0);void d(int w){if(!o[w])for(auto x:e[w])d(x),o[w]=max(o[w],o[x]+1);}main(){int a=0,u,v,n,m;scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&u,&v);,e[u].push_back(v);for(;m++<n;)d(m),a=max(a,o[m]);cout<<a;}
      |                                                                                      ^~~
      |                                                                                      std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc: At global scope:
a.cc:2:104: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | std::vector<int>e[1<<17],o(1<<17,0);void d(int w){if(!o[w])for(auto x:e[w])d(x),o[w]=max(o[w],o[x]+1);}main(){int a=0,u,v,n,m;scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&u,&v);,e[u].push_back(v);for(;m++<n;)d(m),a=max(a,o[m]);cout<<a;}
      |                                                                                                        ^~~~
a.cc: In function 'int main()':
a.cc:2:177: error: expected primary-expression before ',' token
    2 | std::vector<int>e[1<<17],o(1<<17,0);void d(int w){if(!o[w])for(auto x:e[w])d(x),o[w]=max(o[w],o[x]+1);}main(){int a=0,u,v,n,m;scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&u,&v);,e[u].push_back(v);for(;m++<n;)d(m),a=max(a,o[m]);cout<<a;}
      |                                                                                                                                                                                 ^
a.cc:2:215: error: 'max' was not declared in this scope; did you mean 'std::max'?
    2 | std::vector<int>e[1<<17],o(1<<17,0);void d(int w){if(!o[w])for(auto x:e[w])d(x),o[w]=max(o[w],o[x]+1);}main(){int a=0,u,v,n,m;scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&u,&v);,e[u].push_back(v);for(;m++<n;)d(m),a=max(a,o[m]);cout<<a;}
      |                                                                                                                                                                                                                       ^~~
      |                                                                                                                                                                                                                       std::max
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:2:227: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    2 | std::vector<int>e[1<<17],o(1<<17,0);void d(int w){if(!o[w])for(auto x:e[w])d(x),o[w]=max(o[w],o[x]+1);}main(){int a=0,u,v,n,m;scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&u,&v);,e[u].push_back(v);for(;m++<n;)d(m),a=max(a,o[m]);cout<<a;}
      |                                                                                                                                                                                                                                   ^~~~
      |                                                                                                                                                                                                                                   std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~