# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
743211 |
2023-05-17T08:54:07 Z |
vjudge1 |
Lasers (NOI19_lasers) |
C++17 |
|
1 ms |
468 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 = 1e4+5 ;
int n , m , cnt , ans ;
int l , r ;
int qs[N] ;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> l >> r ;
for(int i=1;i<=r;i++){
int x , y ; cin >> x >> y ;
int st = l - y + 1 , ed = y ;
if(st <= ed){
qs[st]++ , qs[ed+1]-- ;
}
}
for(int i=1;i<=l;i++){
qs[i] += qs[i-1] ;
if(qs[i] > 0) ans++ ;
}
cout << ans ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
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 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |