/ XMU_ACM /

记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:12:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long int *' [-Wformat=]
         scanf("%d",&n);
                 ^
/in/foo.c:17:21: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long int *' [-Wformat=]
             scanf("%d",&a[j]);
                     ^
/in/foo.c:19:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long int *' [-Wformat=]
         scanf("%d",&k);
                 ^
/in/foo.c:21:19: warning: passing argument 1 of 'theKbig' from incompatible pointer type [-Wincompatible-pointer-types]
         r=theKbig(a,n,k);
                   ^
/in/foo.c:6:9: note: expected 'int *' but argument is of type 'long long int *'
     int theKbig(int a[],int n,int k);
         ^~~~~~~
/in/foo.c:22:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
         printf("%d\n",r);
                  ^
/in/foo.c: At top level:
/in/foo.c:26:15: error: conflicting types for 'theKbig'
 long long int theKbig(long long int a[],long long int n,long long int k)
               ^~~~~~~
/in/foo.c:6:9: note: previous declaration of 'theKbig' was here
     int theKbig(int a[],int n,int k);
         ^~~~~~~

信息

递交者
类型
递交
题目
K_th
语言
C
递交时间
2018-03-26 19:16:32
评测时间
2018-03-26 19:16:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes