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