0_0_19373001_2149.cpp: In function 'void work(int)':
0_0_19373001_2149.cpp:40:31: error: invalid operands of types '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' and 'const int' to binary 'operator%'
ans=(pow(2,n)-1-n-n*(n-1)/2)%mod;
^
|