# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
243235 | Kubin | Gondola (IOI14_gondola) | C++17 | 25 ms | 3968 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 <bits/stdc++.h>
#ifndef XHOVA
#include "gondola.h"
#endif
using namespace std;
int valid(int n, int A[])
{
int k = -1;
for(int i = 0; i < n and k == -1; i++)
if(A[i] <= n)
k = (n + i - (A[i]-1)) % n;
if(k != -1)
rotate(A, A + k, A + n);
for(int i = 0; i < n; i++)
if(A[i] <= n and A[i]-1 != i)
return false;
return unordered_set<int>(A, A + n).size() == (size_t)n;
}
int replacement(int n, int A[], int out[])
{
}
int countReplacement(int n, int A[])
{
}
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... |