dyn.cpp:99:5: error: redefinition of 'int n'
99 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:5: note: 'int n' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:99:8: error: redefinition of 'int m'
99 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:8: note: 'int m' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:99:11: error: redefinition of 'int d [300050]'
99 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:11: note: 'int d [300050]' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:99:17: error: redefinition of 'int f [300050]'
99 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:17: note: 'int f [300050]' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:99:23: error: redefinition of 'int h [300050]'
99 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:23: note: 'int h [300050]' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:100:13: error: redefinition of 'std::vector<int> g [300050]'
100 | vector<int> g[N], dfn;
| ^
dyn.cpp:17:13: note: 'std::vector<int> g [300050]' previously declared here
17 | vector<int> g[N], dfn;
| ^
dyn.cpp:100:19: error: redefinition of 'std::vector<int> dfn'
100 | vector<int> g[N], dfn;
| ^~~
dyn.cpp:17:19: note: 'std::vector<int> dfn' previously declared here
17 | vector<int> g[N], dfn;
| ^~~
dyn.cpp:102:13: error: redefinition of 'std::vector<int> rev_dfn(int)'
102 | vector<int> rev_dfn(int src)
| ^~~~~~~
dyn.cpp:19:13: note: 'std::vector<int> rev_dfn(int)' previously defined here
19 | vector<int> rev_dfn(int src)
| ^~~~~~~
dyn.cpp:119:5: error: redefinition of 'int ok(int)'
119 | int ok(int y)
| ^~
dyn.cpp:36:5: note: 'int ok(int)' previously defined here
36 | int ok(int y)
| ^~
dyn.cpp:144:5: error: redefinition of 'int main()'
144 | int main()
| ^~~~
dyn.cpp:61:5: note: 'int main()' previously defined here
61 | int main()
| ^~~~
dyn.cpp:182:5: error: redefinition of 'int n'
182 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:5: note: 'int n' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:182:8: error: redefinition of 'int m'
182 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:8: note: 'int m' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:182:11: error: redefinition of 'int d [300050]'
182 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:11: note: 'int d [300050]' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:182:17: error: redefinition of 'int f [300050]'
182 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:17: note: 'int f [300050]' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:182:23: error: redefinition of 'int h [300050]'
182 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:16:23: note: 'int h [300050]' previously declared here
16 | int n, m, d[N], f[N], h[N];
| ^
dyn.cpp:183:13: error: redefinition of 'std::vector<int> g [300050]'
183 | vector<int> g[N], dfn;
| ^
dyn.cpp:17:13: note: 'std::vector<int> g [300050]' previously declared here
17 | vector<int> g[N], dfn;
| ^
dyn.cpp:183:19: error: redefinition of 'std::vector<int> dfn'
183 | vector<int> g[N], dfn;
| ^~~
dyn.cpp:17:19: note: 'std::vector<int> dfn' previously declared here
17 | vector<int> g[N], dfn;
| ^~~
dyn.cpp:185:13: error: redefinition of 'std::vector<int> rev_dfn(int)'
185 | vector<int> rev_dfn(int src)
| ^~~~~~~
dyn.cpp:19:13: note: 'std::vector<int> rev_dfn(int)' previously defined here
19 | vector<int> rev_dfn(int src)
| ^~~~~~~
dyn.cpp:202:5: error: redefinition of 'int ok(int)'
202 | int ok(int y)
| ^~
dyn.cpp:36:5: note: 'int ok(int)' previously defined here
36 | int ok(int y)
| ^~
dyn.cpp:227:5: error: redefinition of 'int main()'
227 | int main()
| ^~~~
dyn.cpp:61:5: note: 'int main()' previously defined here
61 | int main()
| ^~~~
dyn.cpp: In function 'int main()':
dyn.cpp:64:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
64 | scanf("%d%d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~~~
dyn.cpp:65:39: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
65 | for (int i = 1; i <= n; ++i) scanf("%d", d+i);
| ~~~~~^~~~~~~~~~~
dyn.cpp:68:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
68 | scanf("%d%d", &u, &v), g[u].push_back(v), g[v].push_back(u);
| ~~~~~^~~~~~~~~~~~~~~~
dyn.cpp: In function 'int main()':
dyn.cpp:147:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
147 | scanf("%d%d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~~~
dyn.cpp:148:39: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
148 | for (int i = 1; i <= n; ++i) scanf("%d", d+i);
| ~~~~~^~~~~~~~~~~
dyn.cpp:151:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
151 | scanf("%d%d", &u, &v), g[u].push_back(v), g[v].push_back(u);
| ~~~~~^~~~~~~~~~~~~~~~
dyn.cpp: In function 'int main()':
dyn.cpp:230:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
230 | scanf("%d%d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~~~
dyn.cpp:231:39: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
231 | for (int i = 1; i <= n; ++i) scanf("%d", d+i);
| ~~~~~^~~~~~~~~~~
dyn.cpp:234:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
234 | scanf("%d%d", &u, &v), g[u].push_back(v), g[v].push_back(u);
| ~~~~~^~~~~~~~~~~~~~~~