0_0_21265894_8559.cpp: In function 'int main()':
0_0_21265894_8559.cpp:164:76: error: invalid operands of types '__gnu_cxx::__promote_2<int, long long int, double, double>::__type {aka double}' and 'long long int' to binary 'operator%'
ans += ((get(t1,1,p[i].c,tot)-get(t2,1,p[i].c+1,tot))%mod*pow(3,p[i].b)%mod);
^
|