/ Vijos /

记录详情

Compile Error

/in/foo.c: In function 'sum':
/in/foo.c:5:24: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  for(int i = 1 ; i <= n, i++ ){
                        ^
/in/foo.c:5:30: error: expected ';' before ')' token
  for(int i = 1 ; i <= n, i++ ){
                              ^
/in/foo.c: In function 'main':
/in/foo.c:14:8: error: invalid suffix "n" on integer constant
  int a[2n+1];
        ^~
/in/foo.c:19:2: error: variable-sized object may not be initialized
  int f[n+1][n+1] = {0};
  ^~~
/in/foo.c:19:21: warning: excess elements in array initializer
  int f[n+1][n+1] = {0};
                     ^
/in/foo.c:19:21: note: (near initialization for 'f[0]')
/in/foo.c:19:2: warning: excess elements in array initializer
  int f[n+1][n+1] = {0};
  ^~~
/in/foo.c:19:2: note: (near initialization for 'f')
/in/foo.c:32:0: note: -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
 }
 
/in/foo.c:32:1: error: expected declaration or statement at end of input
 }
 ^
/in/foo.c:14:6: warning: unused variable 'a' [-Wunused-variable]
  int a[2n+1];
      ^

信息

递交者
类型
递交
题目
P1312 能量项链
语言
C
递交时间
2024-05-26 01:30:37
评测时间
2024-05-26 01:30:37
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes