Submission
Status:
[PP-SS][SSSSS][SSSSSSSSSS]
Score: 0
User: mairuu
Problemset: ห้องสมุดเมือง 3M
Language: cpp
Time: 0.003 second
Submitted On: 2025-03-20 22:59:23
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);cin.tie(0);
int n,x,y,c;
vector<int> v;
cin >> n;
for(int i = 0;i<n;i++){
cin >> x >> y;
for(int i = x;i<y;i++){
v.push_back(i);
}
}
sort(v.begin(),v.end());
c = (v.size()/2)-1;
cout << v[c];
}