Submission #807862

#TimeUsernameProblemLanguageResultExecution timeMemory
807862OrazBGondola (IOI14_gondola)C++14
0 / 100
1 ms212 KiB
#include <bits/stdc++.h>
#include "gondola.h"
using namespace std;
#define all(x) (x).begin(), (x).end()
#define ll long long int
#define pii pair <int, int>
#define pb push_back
#define ff first
#define ss second

const int N = 1e5+5;
map<int,int> mp;

int valid(int n, int A[]){
	mp.clear();
	int pos = -1;
	for (int i = 0; i < n; i++){
		if (mp[A[i]]++) return 0;
		if (A[i] <= n) pos = i;
	}
	if (pos == -1) return 1;
	int x = A[pos];
	for (int i = pos; i < n; i++){
		if (A[i] <= n and A[i] != x) return 0;
		x++;
		if (x == n+1) x = 1;
	}
	return 1;
}

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

int countReplacement(int n, int inputSeq[])
{
  return -3;
}

// int main ()
// {
// 	ios::sync_with_stdio(false);
// 	cin.tie(0);
// 	cin >> t;
// 	while (t--){
		
// 	}
// }	
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...