xanadu.cpp: In function 'void dfs(int, int)':
xanadu.cpp:38:23: warning: statement has no effect [-Wunused-value]
38 | dp[v][0][1];
| ~~~~~~~~~~^
xanadu.cpp:39:23: warning: statement has no effect [-Wunused-value]
39 | dp[v][1][0];
| ~~~~~~~~~~^
xanadu.cpp:42:23: warning: statement has no effect [-Wunused-value]
42 | dp[v][0][0];
| ~~~~~~~~~~^
xanadu.cpp:45:23: warning: statement has no effect [-Wunused-value]
45 | dp[v][1][1];
| ~~~~~~~~~~^
xanadu.cpp:33:9: warning: variable 'y' set but not used [-Wunused-but-set-variable]
33 | int y;
| ^
xanadu.cpp: In function 'void usaco(std::string)':
xanadu.cpp:5:29: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
5 | void usaco(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xanadu.cpp:5:66: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
5 | void usaco(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xanadu.cpp: In function 'int main()':
xanadu.cpp:62:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
62 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
xanadu.cpp:64:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
64 | scanf("%d%d",&x,&y);
| ~~~~~^~~~~~~~~~~~~~
xanadu.cpp:70:31: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
70 | for(int i=1;i<=n;i++)scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~~~~
xanadu.cpp: In function 'void dfs(int, int)':
xanadu.cpp:52:35: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
52 | dp[v][1][1]=dp[x][0][1]+1;
| ~~~~~~~~~~^