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: 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:74:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
74 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
xanadu.cpp:76:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
76 | scanf("%d%d",&x,&y);
| ~~~~~^~~~~~~~~~~~~~
xanadu.cpp:82:31: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
82 | for(int i=1;i<=n;i++)scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~~~~
xanadu.cpp: In function 'void dfs(int, int)':
xanadu.cpp:54:35: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
54 | dp[v][0][0]=dp[x][1][0];
| ~~~~~~~~~~^
xanadu.cpp:61:51: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
61 | dp[v][0][0]=min(dp[x][0][0]+dp[y][0][0],dp[x][1][0]+dp[y][1][0]);
| ~~~~~~~~~~^