Submission #1064025

# Submission time Handle Problem Language Result Execution time Memory
1064025 2024-08-18T08:25:53 Z YassineBenYounes Gondola (IOI14_gondola) C++17
20 / 100
8 ms 1232 KB
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
int valid(int n, int arr[]){
    for(int i = 0; i < n;i++){
        if(arr[i] == n){
            if(arr[(i+1) % n] != 1)return 0;
        }
        else{
            if(arr[(i+1) % n] != (arr[i]+1))return 0;
        }
    }
    return 1;
}
int replacement(int n, int gondolaSeq[], int replacementSeq[]){

}
int countReplacement(int n, int inputSeq[]){

}

Compilation message

gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
   17 | }
      | ^
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 444 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 352 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 3 ms 604 KB Output is correct
7 Correct 6 ms 1084 KB Output is correct
8 Correct 5 ms 1116 KB Output is correct
9 Correct 2 ms 580 KB Output is correct
10 Correct 5 ms 1128 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 360 KB Output is correct
2 Correct 1 ms 360 KB Output is correct
3 Correct 1 ms 360 KB Output is correct
4 Correct 1 ms 356 KB Output is correct
5 Correct 0 ms 360 KB Output is correct
6 Correct 3 ms 724 KB Output is correct
7 Correct 6 ms 1128 KB Output is correct
8 Correct 5 ms 1096 KB Output is correct
9 Correct 2 ms 508 KB Output is correct
10 Correct 8 ms 1124 KB Output is correct
11 Correct 0 ms 352 KB Output is correct
12 Correct 0 ms 360 KB Output is correct
13 Correct 4 ms 720 KB Output is correct
14 Correct 0 ms 360 KB Output is correct
15 Correct 8 ms 1232 KB Output is correct
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 612 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 360 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 452 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 360 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 360 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 360 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 356 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -