| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1308279 | Rares | 곤돌라 (IOI14_gondola) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
#include "gondola.h"
using namespace std;
const int MAXN=1e6+10;
const int MOD=1e9+9;
int f[MAXN];
int valid (int n, int a[]){
int x=-1;
for (int i=1;i<=n;++i){
if (a[i]>n) continue;
int crt=a[i]-i;
if (crt<0) crt+=n;
if (x==-1){
x=crt;
}
else{
if (x!=crt) return false;
}
}
return true;
}
