| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1368710 | JelaByteEngineer | Gondola (IOI14_gondola) | C++20 | 20 ms | 4656 KiB |
#include <bits/stdc++.h>
#include "gondola.h"
#define ll long long
using namespace std;
int valid (int n, int ins[])
{
int prviidx=-1;
set <int> s;
for (int i=0; i<n; i++) s.insert(ins[i]);
if (s.size()<n) return 0;
for (int i=0; i<n; i++)
{
if (ins[i]<=n)
{
prviidx=i;
break;
}
}
int trn=ins[prviidx];
bool f=true;
for (int i=prviidx+1; i<n; i++)
{
trn++;
trn%=n;
if (trn==0) trn=n;
if (ins[i]!=trn && ins[i]<=n)
{
f=false;
break;
}
}
if (f) return 1;
else return 0;
}
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... | ||||
