# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
297805 | juckter | Gondola (IOI14_gondola) | C++14 | 75 ms | 5112 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 "gondola.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAXV = 3e5 + 10;
const ll MOD = 1e9 + 9;
ll mpow(ll b, ll e) {
ll res = 1;
for(ll k = 1; k <= e; k *= 2) {
if(k & e) res = (res * b) % MOD;
b = (b * b) % MOD;
}
return res;
}
int valid(int n, int inputSeq[]) {
set<int> seen;
int rot = -1;
for(int i = 0; i < n; i++) {
if(seen.count(inputSeq[i]))
return 0;
seen.insert(inputSeq[i]);
if(inputSeq[i] <= n) {
int nr = (inputSeq[i] - i + n) % n;
if(rot != -1 && rot != nr)
return 0;
rot = nr;
}
Compilation message (stderr)
# | 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... |