| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1297121 | harryleee | Gondola (IOI14_gondola) | C++20 | 6 ms | 1352 KiB |
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
bool exist[25000];
int valid(int n, int a[]){
memset(exist, false, sizeof(exist));
int app = -1;
for (int i = 0; i < n; ++i){
if (exist[a[i]]) return false;
exist[a[i]] = true;
if (a[i] <= n && app == -1) app = i;
}
if (app == -1) return 1;
for (int i = app + 1; i < n; ++i){
if (a[i] <= n){
if (a[i] == 1 && a[i - 1] != n) return 0;
if (a[i] != 1 && a[i - 1] + 1 != a[i]) return 0;
}
else a[i] = a[i - 1] + 1;
}
return 1;
}
int replacement(int n, int gondolaSeq[], int replacementSeq[]){
return 0;
}
int countReplacement(int n, int inputSeq[]){
return 0;
}| # | 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... | ||||
