foo.cc: In function 'void build(int, int, int)':
foo.cc:46:22: warning: array subscript 2 is above array bounds of 'int [2][200000]' [-Warray-bounds]
46 | son[1][now]=son[2][now]=0;
| ~~~~~^
foo.cc:8:5: note: while referencing 'son'
8 | int son[2][N];
| ^~~
foo.cc:48:26: warning: array subscript 2 is above array bounds of 'int [2][200000]' [-Warray-bounds]
48 | if(sit[now]!=R) son[2][now]=Query(sit[now]+1,R);
| ~~~~~^
foo.cc:8:5: note: while referencing 'son'
8 | int son[2][N];
| ^~~
foo.cc:50:13: warning: array subscript 2 is above array bounds of 'int [2][200000]' [-Warray-bounds]
50 | if(son[2][now]) build(son[2][now],sit[now]+1,R);
| ~~~~~^
foo.cc:8:5: note: while referencing 'son'
8 | int son[2][N];
| ^~~
foo.cc: In function 'void dfs(int)':
foo.cc:55:13: warning: array subscript 2 is above array bounds of 'int [2][200000]' [-Warray-bounds]
55 | if(son[2][u]) dfs(son[2][u]);
| ~~~~~^
foo.cc:8:5: note: while referencing 'son'
8 | int son[2][N];
| ^~~
foo.cc:61:47: warning: array subscript 2 is above array bounds of 'int [2][200000]' [-Warray-bounds]
61 | dp[0][u]=(dp[0][son[1][u]]*dp[1][son[2][u]]%mod+dp[1][son[1][u]]*dp[0][son[2][u]]%mod+dp[0][son[1][u]]*dp[0][son[2][u]]%mod)%mod;
| ~~~~~^
foo.cc:8:5: note: while referencing 'son'
8 | int son[2][N];
| ^~~
foo.cc:57:47: warning: array subscript 2 is above array bounds of 'int [2][200000]' [-Warray-bounds]
57 | dp[0][u]=(dp[0][son[1][u]]*dp[0][son[2][u]])%mod;
| ~~~~~^
foo.cc:8:5: note: while referencing 'son'
8 | int son[2][N];
| ^~~
Found 10 testcases.
[Hydro](https://hydro.ac)提供评测服务