Submission
Status:
[PP-SS][SSSSS][SSSSSSSSSS]
Subtask/Task Score:
{0/20}{0/30}{0/50}
Score: 0
User: pann
Problemset: ห้องสมุดเมือง 3M
Language: cpp
Time: 0.003 second
Submitted On: 2026-10-12 11:13:29
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> v;
for (int i = 0; i < n; i++){
int x, y;
cin >> x >> y;
for (int j = x; j < y; j++){
v.push_back(j);
}
}
sort(v.begin(), v.end());
cout << v[v.size()/2-1];
return 0;
}