Submission #107691

# Submission time Handle Problem Language Result Execution time Memory
107691 2019-04-25T13:22:04 Z FiloSanza Gondola (IOI14_gondola) C++14
10 / 100
16 ms 1552 KB
#include <bits/stdc++.h>
#include "gondola.h"

using namespace std;

int valid(int N, int inputSeq[])
{
    vector<int> v(N);
    for(int i=0; i<N; i++) v[i] = inputSeq[i];
    
    int mini = min_element(v.begin(), v.end()) - v.begin();

    for(int i=mini+1; i != mini; i=(i+1)%N){
        if(v[i] > N) continue;
        if(i == 0 && v.back() <= N && v.front() <= v.back()) return 0;
        if(v[i-1] <= N && v[i] <= v[i-1]) return 0; 
    }

    return 1;
}

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

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 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 3 ms 256 KB Output is correct
4 Correct 3 ms 384 KB Output is correct
5 Correct 3 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 3 ms 256 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 8 ms 896 KB Output is correct
7 Correct 14 ms 1536 KB Output is correct
8 Correct 15 ms 1280 KB Output is correct
9 Correct 5 ms 640 KB Output is correct
10 Correct 13 ms 1536 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 3 ms 356 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 368 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 8 ms 768 KB Output is correct
7 Correct 15 ms 1536 KB Output is correct
8 Correct 11 ms 1280 KB Output is correct
9 Correct 8 ms 640 KB Output is correct
10 Correct 16 ms 1552 KB Output is correct
11 Incorrect 3 ms 384 KB Output isn't correct
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 512 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 512 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 256 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -