| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1308278 | Rares | Gondola (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];
bool 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;
}
