Submission #754556

#TimeUsernameProblemLanguageResultExecution timeMemory
754556JellyTheOctopusmedians (balkan11_medians)C++17
0 / 100
43 ms2996 KiB
// 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...