| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1363402 | toma_ariciu | Gondola (IOI14_gondola) | C++20 | 4 ms | 1348 KiB |
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
const int maxN = 250005;
int poz[maxN];
int valid(int n, int inputSeq[]) {
for (int i = 1; i <= n; i++) {
int x = inputSeq[i];
if (poz[x]) {
return 0;
}
poz[x] = i;
}
for (int i = 1; i < n; i++) {
int diff = poz[i + 1] - poz[i];
if (diff < 0) {
diff += n;
}
if (diff != 1) {
return 0;
}
}
return 1;
}
int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
return -2;
}
int countReplacement(int n, int inputSeq[])
{
return -3;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
