/ Vijos /

记录详情

Compile Error

foo.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 include <stdio.h> include <stdlib.h> include <string.h>
         ^
foo.c: In function 'main':
foo.c:16:2: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
  scanf("%d%d",&n,&m);
  ^~~~~
foo.c:16:2: warning: incompatible implicit declaration of built-in function 'scanf'
foo.c:16:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
foo.c:18:13: error: 'a' undeclared (first use in this function)
  scanf("%s",a);
             ^
foo.c:18:13: note: each undeclared identifier is reported only once for each function it appears in
foo.c:31:16: error: expected ')' before numeric constant
  a1[i] = (a1[i]10+a[j]-'0')%p1;
                ^~
foo.c:32:16: error: expected ')' before numeric constant
  a2[i] = (a2[i]10+a[j]-'0')%p2;
                ^~
foo.c:33:16: error: expected ')' before numeric constant
  a3[i] = (a3[i]10+a[j]-'0')%p3;
                ^~
foo.c:34:16: error: expected ')' before numeric constant
  a4[i] = (a4[i]10+a[j]-'0')%p4;
                ^~
foo.c:56:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
     printf("%d\n",ans1);
     ^~~~~~
foo.c:56:5: warning: incompatible implicit declaration of built-in function 'printf'
foo.c:56:5: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:60:5: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
     memset(can1,0,sizeof(can1));
     ^~~~~~
foo.c:60:5: warning: incompatible implicit declaration of built-in function 'memset'
foo.c:60:5: note: include '<string.h>' or provide a declaration of 'memset'
foo.c:64:22: error: expected expression before '?' token
             s1 = (s1+??a1[i]*tx1)%p1;
                      ^
foo.c:65:27: error: expected expression before ')' token
             tx1 = (tx1*x1?)%p1;
                           ^
foo.c:71:19: error: 'sizeo' undeclared (first use in this function)
     memset(can2,0,sizeo?f(can2));
                   ^~~~~
foo.c:71:25: warning: implicit declaration of function 'f' [-Wimplicit-function-declaration]
     memset(can2,0,sizeo?f(can2));
                         ^
foo.c:71:32: error: expected ':' before ')' token
     memset(can2,0,sizeo?f(can2));
                                ^
foo.c:72:27: error: expected expression before ')' token
     for (x = 0;x < p2;x?++) {
                           ^
foo.c:83:29: error: expected expression before '?' token
     for (x = 0;x < p3;x++) {??
                             ^
foo.c:85:33: error: expected expression before '?' token
         for (i = 0;i <= n;i++) {??
                                 ^
foo.c:86:35: error: expected ':' before ';' token
             s3 = (s3+a3[i]*tx3)%p3;
                                   ^
foo.c:88:10: error: expected expression before '?' token
         }??
          ^
foo.c:109:5: warning: incompatible implicit declaration of built-in function 'printf'
     printf("%d\n",ans1);
     ^~~~~~
foo.c:109:5: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:15:10: warning: unused variable 'k' [-Wunused-variable]
  int i,j,k;
          ^

信息

递交者
类型
递交
题目
P1798 摄影师的烦恼
语言
C
递交时间
2017-01-26 21:41:35
评测时间
2017-01-26 21:41:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes