/in/foo.cc: In function 'int ksm(int, int)':
/in/foo.cc:11:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (bb&1) sum=(ll)sum*aa%mod; aa=(ll)aa*aa%mod;
^~
/in/foo.cc:11:33: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (bb&1) sum=(ll)sum*aa%mod; aa=(ll)aa*aa%mod;
^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:28:76: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
printf("%d\n",((ll)work(x+z-y+1,0)*work(x,1)%mod*work(z-y+1,1)+mod-1)%mod);
^