foo.cc:6:14: error: 'MAXN' was not declared in this scope
6 | int cnt,head[MAXN];
| ^~~~
foo.cc:13:7: error: 'MAXM' was not declared in this scope
13 | }edge[MAXM];
| ^~~~
foo.cc: In function 'void add_edge(int, int)':
foo.cc:17:9: error: 'edge' was not declared in this scope
17 | edge[++cnt].u=u;
| ^~~~
foo.cc:19:23: error: 'head' was not declared in this scope; did you mean 'read'?
19 | edge[cnt].nxt=head[u];
| ^~~~
| read
foo.cc: In function 'int main()':
foo.cc:31:38: error: 'head' was not declared in this scope; did you mean 'read'?
31 | for(int i=1;i<=n;++i)head[i]=0;
| ^~~~
| read
foo.cc:41:24: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
41 | printf('\n');
| ^~~~
| |
| char
In file included from /nix/gcc-13.3.0/include/c++/13.3.0/cstdio:42,
from /nix/gcc-13.3.0/include/c++/13.3.0/ext/string_conversions.h:45,
from /nix/gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:4109,
from /nix/gcc-13.3.0/include/c++/13.3.0/string:54,
from /nix/gcc-13.3.0/include/c++/13.3.0/bitset:52,
from /nix/gcc-13.3.0/include/c++/13.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:52,
from foo.cc:1:
/nix/glibc-2.40-66-dev/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~