记录详情

Wrong Answer

foo.c: In function 'main':
foo.c:4:15: warning: missing braces around initializer [-Wmissing-braces]
   int a[2][3]={1,2,3,4,5,6},n;
               ^
                {    }{    }
foo.c:8:22: warning: passing argument 1 of 'add' from incompatible pointer type [-Wincompatible-pointer-types]
     printf("%d ",add(a+n));
                      ^
foo.c:5:7: note: expected 'int **' but argument is of type 'int (*)[3]'
   int add(int *p[3]);
       ^~~
foo.c: In function 'add':
foo.c:17:8: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     sum+=*(p+i);
        ^~
foo.c: In function 'main':
foo.c:17:10: warning: 'a' is used uninitialized in this function [-Wuninitialized]
     sum+=*(p+i);
          ^~~~~~
foo.c:17:10: warning: '*((void *)&a+8)' is used uninitialized in this function [-Wuninitialized]
foo.c:17:10: warning: '*((void *)&a+16)' is used uninitialized in this function [-Wuninitialized]
foo.c:17:10: warning: '*((void *)&a+12)' is used uninitialized in this function [-Wuninitialized]
foo.c:17:10: warning: '*((void *)&a+20)' is used uninitialized in this function [-Wuninitialized]
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 639650416, expect 6. 0ms 256.0 KiB

信息

递交者
类型
自测
题目
P1029 比比谁更小
语言
C
递交时间
2021-11-29 17:24:51
评测时间
2021-11-29 17:24:51
评测机
分数
0
总耗时
0ms
峰值内存
256.0 KiB