Submission #1108628

# Submission time Handle Problem Language Result Execution time Memory
1108628 2024-11-04T16:34:12 Z Ariadna Gondola (IOI14_gondola) C++14
20 / 100
19 ms 5984 KB
#include <bits/stdc++.h>
#include "gondola.h"
using namespace std;

int valid(int n, int inputSeq[]) {
    unordered_map<int, int> cnt;
    for (int i = 0; i < n; ++i) cnt[inputSeq[i]]++;
    if ((int)cnt.size() < n) return 0;
    
    for (int i = 1; inputSeq[0]+i <= n; ++i) {
        if (inputSeq[i] <= n && inputSeq[i] != inputSeq[0]+i) return 0;
    }
    
    for (int i = 1; inputSeq[0]-i > 0; ++i) {
        if (inputSeq[n-i] <= n && inputSeq[n-i] != inputSeq[0]-i) return 0;
    }
    return 1;
}

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 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Correct 1 ms 512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 504 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 6 ms 2084 KB Output is correct
7 Correct 15 ms 3936 KB Output is correct
8 Correct 10 ms 3936 KB Output is correct
9 Correct 4 ms 1616 KB Output is correct
10 Correct 13 ms 4448 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 452 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 0 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 6 ms 2220 KB Output is correct
7 Correct 14 ms 3716 KB Output is correct
8 Correct 11 ms 4104 KB Output is correct
9 Correct 5 ms 1616 KB Output is correct
10 Correct 12 ms 4448 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 508 KB Output is correct
13 Correct 7 ms 2220 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 19 ms 5984 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 508 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 592 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -