# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1017599 | serkanrashid | Gondola (IOI14_gondola) | C++14 | 6 ms | 1372 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 <bits/stdc++.h>
using namespace std;
const int maxn = 1e5+5;
int used[maxn];
int valid(int n, int inputSeq[])
{
int st = -1;
for(int i = 0; i < n; i++)
{
if(used[inputSeq[i]]) return false;
used[inputSeq[i]]++;
if(1 <= inputSeq[i] && inputSeq[i] <= n) st = i;
}
if(st==-1) return true;
bool f = true;
int last = inputSeq[st];
int i = st+1;
if(i==n) i = 0;
while(i!=st)
{
last++;
if(last>n) last = 1;
if(1 <= inputSeq[i] && inputSeq[i] <= n)
{
if(last!=inputSeq[i]) return false;
}
i++;
if(i==n) i = 0;
}
return true;
}
int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
}
int countReplacement(int n, int inputSeq[])
{
}
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... |