Submission
Status:
Compilation Error
Subtask/Task Score:
Score: 0
User: NovemNotes
Problemset: ห้องสมุดเมือง 3M
Language: cpp
Time: 0.000 second
Submitted On: 2026-03-11 10:56:14
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll n;
vector<ll> v;
int32_t main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
cin >> n;
for(ll i=0;i<n;i++){
int a,b;cin >> a >> b;s
for(ll j=a;j<b;j++){
v.emplace_back(j);
}
}
sort(v.begin(),v.end());
ll sz = v.size();
// for(auto &x:v)cout << x << " " ;
// cout << "\n";
if(sz==1)cout << v[0] << "\n";
else cout << v[sz/2-1] << "\n";
return 0;
}