# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
799004 | 2023-07-31T08:35:59 Z | FatihSolak | Gondola (IOI14_gondola) | C++17 | 19 ms | 5332 KB |
#include "gondola.h" #include <bits/stdc++.h> using namespace std; vector<int> get(int n,int inputSeq[]){ int pos = 0; for(int i = 0;i<n;i++){ if(inputSeq[i] <= n){ pos = (i + 1 - inputSeq[i] + n)%n; } } vector<int> ret; for(int i = pos;i < n;i++){ ret.push_back(inputSeq[i]); } for(int i = 0;i<pos;i++){ ret.push_back(inputSeq[i]); } return ret; } int valid(int n, int inputSeq[]){ vector<int> inp = get(n,inputSeq); set<int> s; for(int i = 0;i<n;i++){ s.insert(inp[i]); if(inp[i] <= n && inp[i] != i + 1){ return 0; } } if(s.size() != n) return 0; return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]){ return -2; } //---------------------- int countReplacement(int n, int inputSeq[]){ return -3; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 308 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 300 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 308 KB | Output is correct |
6 | Correct | 8 ms | 2496 KB | Output is correct |
7 | Correct | 9 ms | 1728 KB | Output is correct |
8 | Correct | 17 ms | 4556 KB | Output is correct |
9 | Correct | 7 ms | 1620 KB | Output is correct |
10 | Correct | 19 ms | 5320 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 8 ms | 2512 KB | Output is correct |
7 | Correct | 9 ms | 1776 KB | Output is correct |
8 | Correct | 17 ms | 4580 KB | Output is correct |
9 | Correct | 5 ms | 1620 KB | Output is correct |
10 | Correct | 19 ms | 5332 KB | Output is correct |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Correct | 5 ms | 1108 KB | Output is correct |
14 | Correct | 1 ms | 212 KB | Output is correct |
15 | Correct | 7 ms | 1744 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Integer -2 violates the range [0, 350000] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Integer -2 violates the range [0, 350000] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 308 KB | Integer -2 violates the range [0, 350000] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 308 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 308 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 308 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |