Submission #288923

# Submission time Handle Problem Language Result Execution time Memory
288923 2020-09-02T07:27:28 Z Shafin666 Gondola (IOI14_gondola) C++14
10 / 100
14 ms 1152 KB
#include "gondola.h"
#include <bits/stdc++.h>
#define pb push_back
#define pii pair<ll, ll>
#define nyan "(=^・ω・^=)"
#define read_input         freopen("in.txt","r", stdin)
#define print_output       freopen("out.txt","w", stdout)
typedef long long ll;
typedef long double ld;
using namespace std;

int next(int p, int n) {
	int ret = (p + 1) % n;
	return (ret == 0)? n : ret;
}

int valid(int n, int inputSeq[])
{
	int f = 1, prev = -1;
	for(int i = 0; i < n; i++) {
		if(inputSeq[i] >= 1 && inputSeq[i] <= n) {
			if(prev == -1) prev = inputSeq[i];
			else if(next(prev, n) == inputSeq[i]) prev = inputSeq[i];
			else f = 0;
		}
	}
  	return f;
}

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

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 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Correct 0 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Correct 0 ms 384 KB Output is correct
6 Correct 7 ms 640 KB Output is correct
7 Correct 14 ms 1152 KB Output is correct
8 Correct 11 ms 1024 KB Output is correct
9 Correct 4 ms 512 KB Output is correct
10 Correct 13 ms 1152 KB Output is correct
# 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 512 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 6 ms 640 KB Output is correct
7 Correct 14 ms 1152 KB Output is correct
8 Correct 11 ms 1024 KB Output is correct
9 Correct 4 ms 512 KB Output is correct
10 Correct 13 ms 1152 KB Output is correct
11 Incorrect 0 ms 384 KB Output isn't correct
12 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 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 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 -