# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
743048 |
2023-05-17T07:38:28 Z |
vjudge1 |
Lasers (NOI19_lasers) |
C++17 |
|
14 ms |
712 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 MOD = 1e9+7 , N = 1e5+5 ;
int n , m , cnt , ans , qs[N] ;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> n >> m ;
for(int i=1;i<=m;i++){
int x ; cin >> x ;
for(int j=1;j<=x;j++){
int width ;
cin >> width ;
int now = n - width + 1 ;
if(now <= width){
qs[now]++ , qs[width+1]--;
}
}
}
for(int i=1;i<=1e5;i++){
qs[i] += qs[i-1] ;
if(qs[i] > 0) ans++;
}
cout << ans ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
596 KB |
Output is correct |
2 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
596 KB |
Output is correct |
2 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
14 ms |
712 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
596 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
14 ms |
712 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
596 KB |
Output is correct |
2 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |