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;
long long a,b,c,d,e,i,j,ii,jj,zx,xc,f[300009],fx[300009];
int valid(int Nn, int inputSeq[])
{
a=Nn;
for(i=1; i<=a; i++) f[i]=inputSeq[i-1];
for(i=0; i<=300003; i++){
fx[i]=0;
}
set <int> SAE;
for(i=1; i<=a; i++){
if(f[i]<=a){
c=f[i]-i+a*2;c%=a;
SAE.insert(c);
}
}
if(SAE.size()>=2) return 0;
for(i=1; i<=a; i++){
if(fx[f[i]]!=0) return 0;
fx[f[i]]=1;
}
return 1;
}
//----------------------
int replacement(int Nn, int gondolaSeq[], int replacementSeq[])
{
return -2;
}
//----------------------
int countReplacement(int Nn, int inputSeq[])
{
return -3;
}
# | 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... |