Submission #402437

# Submission time Handle Problem Language Result Execution time Memory
402437 2021-05-11T16:55:39 Z Alma Gondola (IOI14_gondola) C++17
0 / 100
2 ms 432 KB
#include <bits/stdc++.h>
#include "gondola.h"
using namespace std;

int valid(int n, int inputSeq[]) {
    for (int i = 1; i < n; i++) {
        if (inputSeq[i-1] == n && inputSeq[i] != 1) return 0;
        else if (inputSeq[i] - inputSeq[i-1] != 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:13:65: warning: no return statement in function returning non-void [-Wreturn-type]
   13 | int replacement(int n, int gondolaSeq[], int replacementSeq[]) {}
      |                                                                 ^
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:15:46: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | int countReplacement(int n, int inputSeq[]) {}
      |                                              ^
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 332 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 328 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 432 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -