/ SeriousOJ /

Record Detail

Memory Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 328.0 KiB
#2 Wrong Answer 1ms 328.0 KiB
#3 Wrong Answer 1ms 376.0 KiB
#4 Wrong Answer 2ms 328.0 KiB
#5 Memory Exceeded ≥247ms ≥256.016 MiB
#6 Memory Exceeded ≥257ms ≥256.016 MiB
#7 Memory Exceeded ≥256ms ≥256.016 MiB
#8 Memory Exceeded ≥274ms ≥256.016 MiB

Code

#include <stdio.h>

int main(){

    int x = 0, t;

    scanf("%d", &t);

    while(x < t){

        int n;

        scanf("%d", &n);


        int ara[n];

        for (int i = 0; i < n; i++){
            ara[i] = i+1;
        }


        if(n  == 1 || n == 2){
            printf("1");
        }
        else{
            printf("%d\n", n - 2 );
        }

        x++;
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1052 Yet Another Array Partition
Contest
Brain Booster #3
Language
C99 (GCC 13.2.0)
Submit At
2024-05-06 16:39:07
Judged At
2024-10-03 13:49:50
Judged By
Score
5
Total Time
≥274ms
Peak Memory
≥256.016 MiB