/ SeriousOJ /

Record Detail

Compile Error

foo.c: In function 'main':
foo.c:10:9: error: redeclaration of 'arr' with no linkage
   10 |     int arr[n];
      |         ^~~
foo.c:5:9: note: previous declaration of 'arr' with type 'int[t]'
    5 |     int arr[t];
      |         ^~~
foo.c:18:5: error: expected declaration or statement at end of input
   18 |     return 0;
      |     ^~~~~~

Code

#include<stdio.h>
int main(){
    int t;
    scanf("%d", &t);
    int arr[t];
    int length;
    arr[t]= length;
    int n;
    scanf("%d", &n);
    int arr[n];
    int sum=0;
    if(arr[n]!= 2 * 10^5){
        printf("YES");
    } else{
        printf("NO");

    }
    return 0;

Information

Submit By
Type
Submission
Problem
P1229 Array of Beauty
Contest
LUCC Presents Kick & Code Intra LU Programming Contest
Language
C11 (GCC 13.2.0)
Submit At
2025-09-01 06:09:11
Judged At
2025-09-01 06:09:11
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes