Submission
Status:
[PP-SS][SSSSS][SSSSSSSSSS]
Subtask/Task Score:
{0/20}{0/30}{0/50}
Score: 0
User: Karatat007
Problemset: ห้องสมุดเมือง 3M
Language: cpp
Time: 0.003 second
Submitted On: 2026-10-08 08:31:10
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<int> v;
int count = 0;
for(int i = 1;i <= n;++i){
int x,y;
cin >> x >> y;
for(int j = x;j <= y-1;++j){
v.push_back(j);
count++;
}
}
sort(v.begin(),v.end());
cout << v[count/2 - 1];
}