| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1361940 | ivaziva | Gondola (IOI14_gondola) | C++20 | 4 ms | 580 KiB |
#include <bits/stdc++.h>
//#include <assert.h>
#include "gondola.h"
using namespace std;
//int gondolaSequence[100001];
//int replacementSequence[250001];
int valid(int n, int inputSeq[])
{
bool valid=true;int last=-1;
for (int i=0;i<n;i++)
{
if (inputSeq[i]<=n and last==-1) {last=i;continue;}
if (inputSeq[i]>n) continue;
int diff=inputSeq[i]-inputSeq[last];
if (diff<0) diff+=n;
if (diff!=i-last) {valid=false;break;}
last=i;
}
if (valid) return 1;
return 0;
}
int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
return 0;
}
int countReplacement(int n, int inputSeq[])
{
return 0;
}
| # | 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... | ||||
