/ Vijos /

记录详情

Compile Error

foo.c:1:1: error: unknown type name 'using'
 using namespace std;
 ^
foo.c:1:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
 using namespace std;
                 ^
foo.c:3:1: error: unknown type name 'bool'
 bool cheak(int x){
 ^
foo.c: In function 'cheak':
foo.c:6:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (int i=0;i<=n;i++)
     ^
foo.c:6:5: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c: In function 'main':
foo.c:15:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
     scanf("%d%d%d",&L,&n,&m);
     ^
foo.c:15:5: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:16:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (int i=0;i<n;i++)scanf("%d",&a[i]);
     ^
foo.c:25:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
     printf("%d",ans);
     ^
foo.c:25:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]

信息

递交者
类型
递交
题目
P1981 跳石头
语言
C
递交时间
2016-11-17 21:24:13
评测时间
2016-11-17 21:24:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes