QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#794483#9782. NonZero PrefSuf SumsI_be_wannaCompile Error//C++201.4kb2024-11-30 14:31:202024-11-30 14:31:20

Details

answer.code: In function ‘int main()’:
answer.code:44:107: error: expected ‘;’ before ‘}’ token
   44 |         c[0][0]=1;for(int i=1;i<=n;i++){c[i][0]=1;for(int j=1;j<=i;j++)c[i][j]=(c[i-1][j-1]+c[i-1][j])%mod}int ans=f[n*m];for(int i=0;i<=n;i++){if(i&&n-i<2){if(n-i==1)(ans+=1ll*m*n*2%mod)%=mod;}else{for(int l=1,r;l<=m;l=r+1)r=m/(m/l),(ans+=2ll*F(n-i,m/l)*c[n][i]%mod*(r-l+1)%mod)%=mod;}}ans=(qpow(m*2+1,n)+mod-ans)%mod;printf("%d",ans);return 0;}
      |                                                                                                           ^
      |                                                                                                           ;
answer.code:23:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   23 |         scanf("%d%d%d",&n,&m,&mod);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~