0_0_17807957_6311.cpp: In function 'pii findRoot(int)':
0_0_17807957_6311.cpp:20:16: error: 'n' was not declared in this scope
if (to[i] == n && !vis[to[i]]) {
^
0_0_17807957_6311.cpp: In function 'int main()':
0_0_17807957_6311.cpp:44:16: error: 'n' was not declared in this scope
scanf("%d", &n);
^
0_0_17807957_6311.cpp:46:17: error: 'val' was not declared in this scope
scanf("%d", &val[i]);
^
0_0_17807957_6311.cpp:58:8: error: 'val' was not declared in this scope
if (val[i] == n) {
^
0_0_17807957_6311.cpp:65:19: error: 'val' was not declared in this scope
if (!vis[i] && val[i] == n) {
^
0_0_17807957_6311.cpp:74:2: error: expected primary-expression before '}' token
}
^
|