Submission

Status:

[P-SSS][SSSSS][SSSSSSSSSS]

Subtask/Task Score:

{0/20}{0/30}{0/50}

Score: 0

User: 666whynot

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-23 16:41:14

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios::sync_with_stdio(false);cin.tie(nullptr);
    int n;cin >> n;
    vector<int> v;
    while(n--){
        int x,y;cin >> x >> y;
        for(int i=x;i<y;i++){
            v.push_back(i);
        }
    }
    sort(v.begin(),v.end());
    int x = v.size() / 2;
    cout << v[x] - 1 ;
}