记录详情

Compile Error

foo.c:2:16: error: expected ';' before 'int'
    2 | int arr[500000]
      |                ^
      |                ;
    3 | int brr[500000]
      | ~~~             
foo.c:3:16: error: expected ';' before 'int'
    3 | int brr[500000]
      |                ^
      |                ;
    4 | 
    5 | int main()
      | ~~~             
foo.c: In function 'main':
foo.c:12:24: error: 'arr' undeclared (first use in this function)
   12 |         scanf("%d%d", &arr[i], &brr[i]);
      |                        ^~~
foo.c:12:24: note: each undeclared identifier is reported only once for each function it appears in
foo.c:12:33: error: 'brr' undeclared (first use in this function)
   12 |         scanf("%d%d", &arr[i], &brr[i]);
      |                                 ^~~
foo.c:15:8: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   15 |     if(N=6)
      |        ^
foo.c:18:20: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   18 |                 if(N=9)
      |                    ^
foo.c:21:29: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   21 |                     printf(N*4);
      |                            ~^~
      |                             |
      |                             int
In file included from foo.c:1:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
  356 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:8:9: warning: unused variable 'max' [-Wunused-variable]
    8 |     int max=0;
      |         ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1534 Problem 4E. 最大社交深度和
语言
C
递交时间
2023-11-02 10:20:09
评测时间
2023-11-02 10:20:09
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes