mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-09-20 19:05:24 +00:00
18 lines
323 B
C++
18 lines
323 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int n, t;
|
|
vector<int> a;
|
|
cin >> n;
|
|
for (int i = 1; i <= n; i++) {
|
|
cin >> t;
|
|
a.insert(upper_bound(a.begin(), a.end(), t), t);
|
|
if (i % 2) {
|
|
cout << a[(i - 1) / 2] << endl;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|