0_0_36876366_8996.cpp: In function 'int main()':
0_0_36876366_8996.cpp:42:82: error: invalid operands of types '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' and 'const int' to binary 'operator%'
if(s[j-1]==s1[i-1]) res=(res+1ll*f[i-1][j]*(pow(2,w[j+1])-1)%N)%N;
^
|