Submission #285629

# Submission time Handle Problem Language Result Execution time Memory
285629 2020-08-29T10:50:13 Z amoo_safar Gondola (IOI14_gondola) C++17
20 / 100
24 ms 1912 KB
#include "gondola.h"

#include <bits/stdc++.h>
#define pb push_back

using namespace std;

int valid(int n, int a[]){
	vector<int> A, S;
	for(int i = 0; i < n; i++) A.pb(a[i]);
	sort(A.begin(), A.end());
	for(int i = 0; i + 1 < n; i++) if(A[i] == A[i + 1]) return 0;
	for(int i = 0; i < n; i++) if(a[i] <= n) S.pb((i - a[i] + n) % n);
	sort(S.begin(), S.end());
	for(int i = 0; i + 1 < (int) S.size(); i++) if(S[i] != S[i + 1]) return 0;
	return 1;
}

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

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

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

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
/*
1
30
16 26 18 19 20 13 22 21 24 25 17 27 28 29 30 1 2 3 11 5 6 8 7 9 10 12 4 23 14 15

*/
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 1 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 14 ms 1148 KB Output is correct
7 Correct 20 ms 1532 KB Output is correct
8 Correct 18 ms 1776 KB Output is correct
9 Correct 6 ms 896 KB Output is correct
10 Correct 23 ms 1904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 9 ms 1148 KB Output is correct
7 Correct 18 ms 1532 KB Output is correct
8 Correct 14 ms 1912 KB Output is correct
9 Correct 6 ms 1024 KB Output is correct
10 Correct 20 ms 1912 KB Output is correct
11 Correct 1 ms 384 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 9 ms 1024 KB Output is correct
14 Correct 1 ms 384 KB Output is correct
15 Correct 24 ms 1656 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 308 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -