Submission #171643

# Submission time Handle Problem Language Result Execution time Memory
171643 2019-12-29T13:21:37 Z gs18103 Gondola (IOI14_gondola) C++14
0 / 100
4 ms 508 KB
#include "gondola.h"
#include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
#define em emplace
#define all(v) v.begin(), v.end()

using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const int MAX = 101010;
const int INF = INT_MAX >> 1;
const ll LINF = LLONG_MAX >> 1;

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