# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
122688 |
2019-06-29T06:44:14 Z |
brcode |
Gondola (IOI14_gondola) |
C++14 |
|
2 ms |
504 KB |
#include <iostream>
#include <algorithm>
#include <map>
#include "gondola.h"
using namespace std;
int arr[2500];
int valid(int n, int inputSeq[]){
map<int,int> m1;
int holdmin = 1e9;
int ind = 0;
for(int i=0;i<n;i++){
if(m1[inputSeq[i]] == 1){
return 0;
}
if(inputSeq[i]<holdmin){
holdmin = inputSeq[i];
ind = i;
}
m1[inputSeq[i]] = 0;
}
for(int i=ind;i<n;i++){
if(inputSeq[i]<=n && inputSeq[i]!=holdmin){
return 0;
}
holdmin++;
}
for(int i=1;i<holdmin;i++){
if(inputSeq[i]<=n && inputSeq[i]!=holdmin){
return 0;
}
holdmin++;
}
return 1;
}
int replacement(int n, int gondolaSeq[], int replacementSeq[]){
return 0;
}
int countReplacement(int n, int inputSeq[]){
return 0;
}
/*int main(){
}*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
504 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
504 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
504 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
504 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |