Submission #66323

# Submission time Handle Problem Language Result Execution time Memory
66323 2018-08-10T08:38:19 Z someone_aa Gondola (IOI14_gondola) C++17
10 / 100
16 ms 4620 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) {
            if(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 Correct 3 ms 248 KB Output is correct
2 Correct 3 ms 488 KB Output is correct
3 Correct 3 ms 556 KB Output is correct
4 Correct 3 ms 652 KB Output is correct
5 Correct 3 ms 652 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 652 KB Output is correct
2 Correct 3 ms 652 KB Output is correct
3 Correct 3 ms 652 KB Output is correct
4 Correct 3 ms 652 KB Output is correct
5 Correct 2 ms 652 KB Output is correct
6 Correct 11 ms 1032 KB Output is correct
7 Correct 16 ms 1680 KB Output is correct
8 Correct 12 ms 2088 KB Output is correct
9 Correct 6 ms 2088 KB Output is correct
10 Correct 14 ms 2892 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2892 KB Output is correct
2 Correct 2 ms 2892 KB Output is correct
3 Correct 2 ms 2892 KB Output is correct
4 Correct 4 ms 2892 KB Output is correct
5 Correct 2 ms 2892 KB Output is correct
6 Correct 8 ms 2892 KB Output is correct
7 Correct 15 ms 3548 KB Output is correct
8 Correct 12 ms 3872 KB Output is correct
9 Correct 6 ms 3872 KB Output is correct
10 Correct 15 ms 4604 KB Output is correct
11 Incorrect 3 ms 4604 KB Output isn't correct
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 4604 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 4604 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 4604 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 4604 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 4608 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 4608 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 4620 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -