Submission #744465

# Submission time Handle Problem Language Result Execution time Memory
744465 2023-05-18T15:18:49 Z MODDI Gondola (IOI14_gondola) C++14
0 / 100
1 ms 304 KB
#include "gondola.h"
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
using namespace std;
int valid(int n, int inputSeq[])
{
  return -1;
}

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

int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
	vi initial(n), replace;
	for(int i = 0; i < n; i++){
		initial[i] = gondolaSeq[i];
	}
	sort(initial.begin(), initial.end());
	int j = 1;
	for(int i = 0; i < n; i++){
		if(initial[i]==j){
			j++;
			continue;
		}
		else{
			replace.pb(j);
			j++;
		}
	}
	int l = replace.size();
	for(int i = 0; i < l; i++)
		replacementSeq[i] = replace[i];
		
	return l;
}

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

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Integer -1 violates the range [0, 1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer -1 violates the range [0, 1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer -1 violates the range [0, 1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 304 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -