# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
120399 |
2019-06-24T11:13:01 Z |
turbat |
Gondola (IOI14_gondola) |
C++14 |
|
6 ms |
1100 KB |
#include <bits/stdc++.h>
#include "gondola.h"
using namespace std;
#define N 100005
int arr[N], mx, pos[3 * N];
bool note[3 * N];
long long mod = 1e9 + 7, ans;
int valid(int n, int inputSeq[]){
memset(arr, 0, sizeof arr);
memset(note, 0, sizeof note);
for (int i = 0;i < n;i++){
pos[inputSeq[i]] = i;
if (note[inputSeq[i]]) return 0;
note[inputSeq[i]] = 1;
}
for (int i = 0;i < n;i++)
if (inputSeq[i] <= n){
int now = inputSeq[i];
arr[i] = now;
for (int j = i + 1;j < n;j++){
now++;
arr[j] = now;
}
for (int j = 0;j < i;j++){
now++;
arr[j] = now;
}
break;
}
int ok = 1;
for (int i = 0;i < n;i++)
if (inputSeq[i] <= n && inputSeq[i] != arr[i])
ok = 0;
return ok;
}
int replacement(int n, int gondolaSeq[], int replacementSeq[]){
return -2;
}
int countReplacement(int n, int inputSeq[]){
return -3;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
1100 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
1024 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
1024 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
384 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
384 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
256 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
384 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |