Main.cpp: In function 'void sub3::solve()':
Main.cpp:83:25: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
83 | f[i&1][val]=(f[i-1&1][j]+f[i&1][val])%mod;
| ~^~
Main.cpp:84:26: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
84 | f[i&1][val2]=(f[i-1&1][j]+f[i&1][val2])%mod;
| ~^~
Main.cpp:90:34: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
90 | if(a[i]<=j) kq=(kq+(f[i-1&1][j]*sum)%mod*(rrh[j]-rrh[a[i]])%mod)%mod;
| ~^~
Main.cpp:91:34: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
91 | if(b[i]<=j) kq=(kq+(f[i-1&1][j]*sum)%mod*(rrh[j]-rrh[b[i]])%mod)%mod;
| ~^~
Main.cpp:97:21: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
97 | sum=(sum+f[i-1&1][j])%mod;
| ~^~
Main.cpp:100:24: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
100 | fori(j,0,lim) f[i-1&1][j]=0;
| ~^~
Main.cpp: In function 'int32_t main()':
Main.cpp:113:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
113 | freopen("1.inp","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~
Main.cpp:114:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
114 | freopen("1.out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~
Main.cpp:119:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
119 | freopen(task".inp","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Main.cpp:120:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
120 | freopen(task".out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Main.cpp: In function 'void sub3::solve()':
Main.cpp:95:38: warning: array subscript 2 is above array bounds of 'long long int [2][20010]' [-Warray-bounds]
95 | if(a[i]<=j) kq=(kq+(sum*g[i+1][j])%mod*(rrh[j]-rrh[a[i]])%mod)%mod;
| ~~~~~^
Main.cpp:52:15: note: while referencing 'sub3::g'
52 | int f[M][N],g[2][N],kq=0;
| ^
Main.cpp:96:38: warning: array subscript 2 is above array bounds of 'long long int [2][20010]' [-Warray-bounds]
96 | if(b[i]<=j) kq=(kq+(sum*g[i+1][j])%mod*(rrh[j]-rrh[b[i]])%mod)%mod;
| ~~~~~^
Main.cpp:52:15: note: while referencing 'sub3::g'
52 | int f[M][N],g[2][N],kq=0;
| ^
Main.cpp:89:25: warning: array subscript 2 is above array bounds of 'long long int [2][20010]' [-Warray-bounds]
89 | sum=(sum+g[i+1][j])%mod;
| ~~~~~^
Main.cpp:52:15: note: while referencing 'sub3::g'
52 | int f[M][N],g[2][N],kq=0;
| ^