# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
618115 | as111 | Gondola (IOI14_gondola) | C++14 | 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 <vector>
#include <set>
using namespace std;
int valid(int n, int inputSeq[]) {
int curr = inputSeq[0];
for (int i = 1; i < n; i++) {
if (i != curr + 1) {
if (i <= n && i != 1) {
return 0;
}
}
curr = inputSeq[i];
}
return 1;
}