Submission

Status:

[PP-SS][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:26:22

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

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