Submission #160669

# Submission time Handle Problem Language Result Execution time Memory
160669 2019-10-29T08:27:47 Z GioChkhaidze Gondola (IOI14_gondola) C++14
0 / 100
2 ms 376 KB
#include <bits/stdc++.h>
#include "gondola.h"

using namespace std;

int valid(int n, int inputSeq[])
{
	for (int i=0; i<n; i++) {
		inputSeq[i+n]=inputSeq[i];
	}
	
	int idx=0;
	for (int i=0; i<n; i++) {
		if (inputSeq[i]<=n) {
			idx=i;
			break;
		}
	}
	
	int x=inputSeq[idx];
	for (int i=idx+1; i<idx+n; i++) {
		x++;
		if (inputSeq[i]<=n && inputSeq[i]!=x) 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 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 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 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 376 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -