/ Vijos /

记录详情

Compile Error

foo.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 include <cstdio> include <cstring> include <cstdlib>
         ^
foo.c:8:11: error: variably modified 'f' at file scope
 long long f[W+1][N];
           ^
foo.c:8:11: error: variably modified 'f' at file scope
foo.c: In function 'main':
foo.c:11:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
 scanf("%d",&t);
 ^
foo.c:11:1: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:15:1: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
 memset(f,0,sizeof f);
 ^
foo.c:15:1: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
foo.c:16:1: error: 'for' loop initial declarations are only allowed in C99 mode
 for (int i=0;i<=c;i++) if (i>n) break; else f[0][i]=1;
 ^
foo.c:16:1: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c:17:10: error: redefinition of 'i'
 for (int i=0;i<W;i++) for (int j=0;j<=n;j++) for (int k=0;k<=c;k++) if (j+k*(1<<i+1)>n) break;
          ^
foo.c:16:10: note: previous definition of 'i' was here
 for (int i=0;i<=c;i++) if (i>n) break; else f[0][i]=1;
          ^
foo.c:17:1: error: 'for' loop initial declarations are only allowed in C99 mode
 for (int i=0;i<W;i++) for (int j=0;j<=n;j++) for (int k=0;k<=c;k++) if (j+k*(1<<i+1)>n) break;
 ^
foo.c:17:23: error: 'for' loop initial declarations are only allowed in C99 mode
 for (int i=0;i<W;i++) for (int j=0;j<=n;j++) for (int k=0;k<=c;k++) if (j+k*(1<<i+1)>n) break;
                       ^
foo.c:17:46: error: 'for' loop initial declarations are only allowed in C99 mode
 for (int i=0;i<W;i++) for (int j=0;j<=n;j++) for (int k=0;k<=c;k++) if (j+k*(1<<i+1)>n) break;
                                              ^
foo.c:17:82: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
 for (int i=0;i<W;i++) for (int j=0;j<=n;j++) for (int k=0;k<=c;k++) if (j+k*(1<<i+1)>n) break;
                                                                                  ^
foo.c:18:21: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
 else f[i+1][j+k(1<<i+1)]=(f[i+1][j+k(1<<i+1)]+f[i][j])%LM;
                     ^
foo.c:18:16: error: called object 'k' is not a function or function pointer
 else f[i+1][j+k(1<<i+1)]=(f[i+1][j+k(1<<i+1)]+f[i][j])%LM;
                ^
foo.c:17:55: note: declared here
 for (int i=0;i<W;i++) for (int j=0;j<=n;j++) for (int k=0;k<=c;k++) if (j+k*(1<<i+1)>n) break;
                                                       ^
foo.c:18:42: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
 else f[i+1][j+k(1<<i+1)]=(f[i+1][j+k(1<<i+1)]+f[i][j])%LM;
                                          ^
foo.c:18:37: error: called object 'k' is not a function or function pointer
 else f[i+1][j+k(1<<i+1)]=(f[i+1][j+k(1<<i+1)]+f[i][j])%LM;
                                     ^
foo.c:17:55: note: declared here
 for (int i=0;i<W;i++) for (int j=0;j<=n;j++) for (int k=0;k<=c;k++) if (j+k*(1<<i+1)>n) break;
                                                       ^
foo.c:19:1: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
 printf("%lld\n",f[W-1][n]);
 ^
foo.c:19:1: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
foo.c:19:1: warning: unknown conversion type character 'l' in format [-Wformat=]
foo.c:19:1: warning: too many arguments for format [-Wformat-extra-args]

信息

递交者
类型
递交
题目
P1932 重要的誓言
语言
C
递交时间
2016-03-18 22:13:37
评测时间
2016-03-18 22:13:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes