# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1064543 |
2024-08-18T14:14:44 Z |
sunboi |
Gondola (IOI14_gondola) |
C++17 |
|
1 ms |
348 KB |
#include <bits/stdc++.h>
#include "gondola.h"
using namespace std;
int valid(int n, int inputSeq[]){
vector<int> a;
int mn = 1e9;
set<int> val;
for (int i = 0; i < n; i++){
mn = min(mn, inputSeq[i]);
val.insert(inputSeq[i]);
}
for (int i = 0; i < n; i++){
if (inputSeq[i] == mn) a.push_back(mn);
else if (!a.empty()){
a.push_back(inputSeq[i]);
}
}
for (int i = 0; i < n; i++){
if (inputSeq[i] == mn) break;
a.push_back(inputSeq[i]);
}
int cnt = a[0];
int f = 1;
for (int i = 0; i < n; i++){
if (cnt == a[i] || a[i] >= n + 1) continue;
f = 0;
}
if ((int)(val.size()) != n) f = 0;
return f;
}
int replacement(int n, int gondolaSeq[], int replacementSeq[]){
return 0;
}
int countReplacement(int n, int inputSeq[]){
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |