Submission #743228

# Submission time Handle Problem Language Result Execution time Memory
743228 2023-05-17T09:00:25 Z vjudge1 Lasers (NOI19_lasers) C++17
0 / 100
1000 ms 72452 KB
#include<bits/stdc++.h>

using namespace std;

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

const int N = 1e9 ;

ll n , m , cnt , ans ;
ll l , r ;

bitset<N> vis ;

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 ;

        for(int j=st;j<=ed;j++) vis[j] = true ;
    }
    for(int i=1;i<=l;i++){
        if(vis[i]) ans++;
    }

    cout << ans ;
}
# Verdict Execution time Memory Grader output
1 Correct 811 ms 500 KB Output is correct
2 Correct 829 ms 37508 KB Output is correct
3 Correct 717 ms 3020 KB Output is correct
4 Correct 958 ms 588 KB Output is correct
5 Correct 719 ms 524 KB Output is correct
6 Execution timed out 1080 ms 72452 KB Time limit exceeded
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 811 ms 500 KB Output is correct
2 Correct 829 ms 37508 KB Output is correct
3 Correct 717 ms 3020 KB Output is correct
4 Correct 958 ms 588 KB Output is correct
5 Correct 719 ms 524 KB Output is correct
6 Execution timed out 1080 ms 72452 KB Time limit exceeded
7 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 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 811 ms 500 KB Output is correct
2 Correct 829 ms 37508 KB Output is correct
3 Correct 717 ms 3020 KB Output is correct
4 Correct 958 ms 588 KB Output is correct
5 Correct 719 ms 524 KB Output is correct
6 Execution timed out 1080 ms 72452 KB Time limit exceeded
7 Halted 0 ms 0 KB -