Submission #3586

#TimeUsernameProblemLanguageResultExecution timeMemory
3586wclee2265Inherited disease (kriii1_I)C++98
Compilation error
0 ms0 KiB
#include <stdio.h> #define MOD 1000000007 #define N 105 FILE *in=stdin; FILE *out=stdout; int n; __int64 d[N]; int main() { int i,j; __int64 total=1,tmp,t=1; fscanf(in,"%d",&n); for(i=1;i<=n;i++) { fscanf(in,"%I64d",&d[i]); for(j=1,tmp=0;j<i;j++) { d[j]*=i; d[j]%=MOD; tmp+=d[j]; tmp%=MOD; } fprintf(out,"%I64d\n",(total+tmp+d[i]-1)%MOD); d[i]--; t*=i; t%=MOD; total+=t; total%=MOD; } fclose(in); fclose(out); return 0; }

Compilation message (stderr)

I.cpp:10:1: error: '__int64' does not name a type
I.cpp: In function 'int main()':
I.cpp:15:2: error: '__int64' was not declared in this scope
I.cpp:15:10: error: expected ';' before 'total'
I.cpp:19:22: error: 'd' was not declared in this scope
I.cpp:20:11: error: 'tmp' was not declared in this scope
I.cpp:27:26: error: 'total' was not declared in this scope
I.cpp:29:3: error: 't' was not declared in this scope
I.cpp:16:20: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]