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:127:8: error: 'sub4' has not been declared
127 | else sub4::solve();
| ^~~~
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);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~