# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
243233 | Kubin | Gondola (IOI14_gondola) | C++17 | 0 ms | 0 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>
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 true;
}
int replacement(int n, int A[], int out[])
{
}
int countReplacement(int n, int A[])
{
}