xorsum.cpp:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
13 | main(){
| ^~~~
xorsum.cpp: In function 'int main()':
xorsum.cpp:43:10: warning: array subscript 2 is above array bounds of 'long long int [2][1005][1005]' [-Warray-bounds]
43 | dp[2][l][r]++;
| ~~~~^
xorsum.cpp:8:30: note: while referencing 'dp'
8 | int a[N],n,Q,ch[M][2],pwr[M],dp[2][N][N],p[2][N];
| ^~
xorsum.cpp:43:10: warning: array subscript 2 is above array bounds of 'long long int [2][1005][1005]' [-Warray-bounds]
43 | dp[2][l][r]++;
| ~~~~^
xorsum.cpp:8:30: note: while referencing 'dp'
8 | int a[N],n,Q,ch[M][2],pwr[M],dp[2][N][N],p[2][N];
| ^~
xorsum.cpp:44:9: warning: array subscript 2 is above array bounds of 'long long int [2][1005]' [-Warray-bounds]
44 | p[2][l]++;
| ~~~^
xorsum.cpp:8:42: note: while referencing 'p'
8 | int a[N],n,Q,ch[M][2],pwr[M],dp[2][N][N],p[2][N];
| ^
xorsum.cpp:44:9: warning: array subscript 2 is above array bounds of 'long long int [2][1005]' [-Warray-bounds]
44 | p[2][l]++;
| ~~~^
xorsum.cpp:8:42: note: while referencing 'p'
8 | int a[N],n,Q,ch[M][2],pwr[M],dp[2][N][N],p[2][N];
| ^
xorsum.cpp:45:9: warning: array subscript 2 is above array bounds of 'long long int [2][1005]' [-Warray-bounds]
45 | p[2][r + 1]--;
| ~~~^
xorsum.cpp:8:42: note: while referencing 'p'
8 | int a[N],n,Q,ch[M][2],pwr[M],dp[2][N][N],p[2][N];
| ^
xorsum.cpp:45:9: warning: array subscript 2 is above array bounds of 'long long int [2][1005]' [-Warray-bounds]
45 | p[2][r + 1]--;
| ~~~^
xorsum.cpp:8:42: note: while referencing 'p'
8 | int a[N],n,Q,ch[M][2],pwr[M],dp[2][N][N],p[2][N];
| ^
xorsum.cpp:65:71: warning: array subscript 2 is above array bounds of 'long long int [2][1005][1005]' [-Warray-bounds]
65 | * l % mod * (n - r + 1) % mod* pwr[Q - p[0][l] - p[1][r] - dp[2][l][r] ] % mod;
| ~~~~^
xorsum.cpp:8:30: note: while referencing 'dp'
8 | int a[N],n,Q,ch[M][2],pwr[M],dp[2][N][N],p[2][N];
| ^~