# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
232071 | anonymous | Gondola (IOI14_gondola) | C++14 | 18 ms | 1408 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "gondola.h"
#include <vector>
#include <iostream>
#define MAXN 100005
#define MAXV 250005
using namespace std;
int valid(int n, int Seq[])
{
bool has[MAXV]={}, b = false;
int pos, v;
for (int i=0; i<n; i++) {
if (Seq[i] <= n) {
pos = i;
v = Seq[i];
}
if (has[Seq[i]]) {return(0);}
has[Seq[i]]=true;
}
for (int i=0; i<n; i++) {
if (Seq[pos] > n) {}
else if (Seq[pos] != v) {return(0);}
pos = (pos+1) %n;
v= v == n ? 1 : v+1;
}
return(1);
}
//----------------------
int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
return -2;
}
//----------------------
int countReplacement(int n, int inputSeq[])
{
return -3;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |