# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432889 | REALITYNB | 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>
#include "gondola.h"
using namespace std;
int valid(int n ,int* a){
set<int> el ;
for(int i=0;i<n;i++) el.insert(a[i]) ;
if(el.size()!=n) return 0 ;
bool flg= 0 ;
for(int i=0;i<n;i++){
if(a[i]>n) continue;
for(int j=i;j<n+i;j++){
if(a[j%n]>n) continue ;
if(a[j%n]==((a[i]+j-i)<=n?a[i]+j-i:a[i]+j-i-n)) continue ;
return 0;
}
break ;
}
return 1 ;
}
int replacementSeq(int n , int* a , int* ans){
return 0 ;
}
int countReplacement(int n,int* a){
return 0 ;
}