Submission
Status:
[PPPPP][PPPPP][xSSSSSSSSS]
Score: 50
User: Nightingale
Problemset: ห้องสมุดเมือง 3M
Language: cpp
Time: 0.439 second
Submitted On: 2025-03-31 19:03:15
#include <bits/stdc++.h>
#define int long long
using namespace std;
vector<int> book;
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int a;
cin >> a;
for(int i=0;i<a;i++){
int b,c;
cin >> b >> c;
for(int j=b;j<c;j++){
book.push_back(j);
}
}
sort(book.begin(),book.end());
int large = book.size()/2-1;
if(large<0) large = 0;
cout << book[large];
}