Submission #743242

# Submission time Handle Problem Language Result Execution time Memory
743242 2023-05-17T09:07:50 Z vjudge1 Lasers (NOI19_lasers) C++17
0 / 100
1 ms 212 KB
#include<bits/stdc++.h>

using namespace std;

using ll = long long ;
using pii = pair<ll , ll> ;
using i3 = tuple<ll , ll , ll> ;

ll n , m , cnt , ans ;
ll l , r ;
ll mnL = 1e18 , mxR = -1e18 ;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

    cin >> l >> r ;

    for(int i=1;i<=r;i++){
        ll x , y ; cin >> x >> y ;

        ll st = l - y + 1 , ed = y ;
        if(st > ed) continue ;
        mnL = min(st , mnL) , mxR = max(ed , mxR) ;
    }

    cout << mxR - mnL + 1 ;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -