Submission

Status:
[PP-SS][SSSSS][SSSSSSSSSS]

Score: 0

User: Nightingale

Problemset: ห้องสมุดเมือง 3M

Language: cpp

Time: 0.002 second

Submitted On: 2025-03-31 18:58:26

#include <bits/stdc++.h>
#define int long long
using namespace std;
int32_t main() 
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a;
  cin >> a;
  vector<int> book;
  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());
  cout << book[book.size()/2-1];
}