Submission #66324

# Submission time Handle Problem Language Result Execution time Memory
66324 2018-08-10T08:40:00 Z someone_aa Gondola (IOI14_gondola) C++17
0 / 100
4 ms 588 KB
#include "gondola.h"
#include <bits/stdc++.h>

using namespace std;

int valid(int n, int arr[]) {
    bool check = true;

    for(int i=1;i<n;i++) {
        if(arr[i] > n) continue;
        else if(arr[i] == 1 && arr[i-1] < n) {
            check = false;
        }
        else {
            if(arr[i-1] <= n && arr[i-1] != arr[i] - 1) check = false;
        }
    }
    if(check) return 1;
    else return 0;
}

//----------------------

int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
  return -2;
}

//----------------------

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 484 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 484 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 484 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 484 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 484 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 560 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 588 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 588 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 588 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -