/ Vijos /

记录详情

Compile Error

foo.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 include<cstdio> 
        ^
foo.c: In function 'main':
foo.c:6:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
 scanf ("%d%d%d",&n ,&s ,&t);
 ^
foo.c:6:1: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:6:18: error: 'n' undeclared (first use in this function)
 scanf ("%d%d%d",&n ,&s ,&t);
                  ^
foo.c:6:18: note: each undeclared identifier is reported only once for each function it appears in
foo.c:6:22: error: 's' undeclared (first use in this function)
 scanf ("%d%d%d",&n ,&s ,&t);
                      ^
foo.c:6:26: error: 't' undeclared (first use in this function)
 scanf ("%d%d%d",&n ,&s ,&t);
                          ^
foo.c:7:1: error: 'for' loop initial declarations are only allowed in C99 mode
 for (int i=1; i<=n; i++) {
 ^
foo.c:7:1: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c:8:15: error: 'd' undeclared (first use in this function)
 scanf("%d" ,& d );
               ^
foo.c:9:15: error: 'f' undeclared (first use in this function)
 scanf("%d" ,& f[d]);
               ^
foo.c:11:1: error: 'N' undeclared (first use in this function)
 N[ f [ d ] ] += 1 ;
 ^
foo.c:12:16: error: 'l' undeclared (first use in this function)
 while(q!='\n'){l[d]+=1; scanf("%c",&q); }
                ^
foo.c:14:5: error: redefinition of 'i'
 int i=t; a-=N[t]; b =l[t];
     ^
foo.c:7:10: note: previous definition of 'i' was here
 for (int i=1; i<=n; i++) {
          ^
foo.c:14:10: error: 'a' undeclared (first use in this function)
 int i=t; a-=N[t]; b =l[t];
          ^
foo.c:14:19: error: 'b' undeclared (first use in this function)
 int i=t; a-=N[t]; b =l[t];
                   ^
foo.c:15:15: error: 'c' undeclared (first use in this function)
 while ( i ) { c[i] =1; i =f[i]; }
               ^
foo.c:18:1: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
 printf("%d\n%d",b,a);
 ^
foo.c:18:1: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
foo.c:19:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1427 机密信息
语言
C
递交时间
2016-06-18 15:35:58
评测时间
2016-06-18 15:35:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes