// Balkan Olympiad in Informatics 2011 Day 1 Problem 3
// Medians
// https://oj.uz/problem/view/balkan11_medians
#include <bits/stdc++.h>
using namespace std;
int N;
int main() {
cin >> N;
vector<int> arr(2*N-1);
for (int i = 0; i < N; i++) {
cin >> arr[i];
}
if (N == 1) {
cout << arr[0] << "\n";
return 0;
}
for (int i = 0; i < N; i++) {
cout << arr[i] << " ";
}
if (arr[0] <= arr[1]) {
for (int i = 0; i < N-1; i++) {
cout << 2*N-1 << " ";
}
}
else {
for (int i = 0; i < N-1; i++) {
cout << 1 << " ";
}
} cout << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Not a permutation |
2 |
Incorrect |
1 ms |
300 KB |
Not a permutation |
3 |
Incorrect |
1 ms |
212 KB |
Not a permutation |
4 |
Incorrect |
1 ms |
212 KB |
Not a permutation |
5 |
Incorrect |
1 ms |
212 KB |
Not a permutation |
6 |
Incorrect |
1 ms |
288 KB |
Not a permutation |
7 |
Incorrect |
1 ms |
212 KB |
Not a permutation |
8 |
Incorrect |
1 ms |
296 KB |
Not a permutation |
9 |
Incorrect |
1 ms |
212 KB |
Not a permutation |
10 |
Incorrect |
1 ms |
212 KB |
Not a permutation |
11 |
Incorrect |
1 ms |
212 KB |
Not a permutation |
12 |
Incorrect |
1 ms |
212 KB |
Not a permutation |
13 |
Incorrect |
1 ms |
304 KB |
Not a permutation |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
304 KB |
Not a permutation |
2 |
Incorrect |
2 ms |
316 KB |
Not a permutation |
3 |
Incorrect |
4 ms |
396 KB |
Not a permutation |
4 |
Incorrect |
7 ms |
672 KB |
Not a permutation |
5 |
Incorrect |
15 ms |
1228 KB |
Not a permutation |
6 |
Incorrect |
29 ms |
2008 KB |
Not a permutation |
7 |
Incorrect |
43 ms |
2996 KB |
Not a permutation |