Submission

Status:

[xSSSS][SSSSS][SSSSSSSSSS]

Subtask/Task Score:

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

Score: 0

User: nik121416

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

Language: cpp

Time: 0.002 second

Submitted On: 2026-03-12 13:21:34

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

int main(){
    int n;
    cin >> n;
    vector<int> book(2e10);
    for(int i = 0 ; i < n;i++){
        int x,y;
        cin >> x >> y;
        for(int j = x;j < y;j++){
            book.push_back(j);
        }
    }
    float a = book.size();
    a /= 2;
    a = floor(a);
    cout << book[a-1];
}