# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1119841 |
2024-11-27T13:50:33 Z |
Aviansh |
Lasers (NOI19_lasers) |
C++17 |
|
1000 ms |
262144 KB |
#include <bits/stdc++.h>
using namespace std;
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
int l,r;
cin >> l >> r;
vector<int>walls[r];
int sums[r];
for(int i = 0;i<r;i++){
int x;
cin >> x;
sums[i]=0;
for(int j = 0;j<x;j++){
int c;
cin >> c;
sums[i]+=c;
walls[i].push_back(c);
}
}
bool val[l];
fill(val,val+l,0);
for(int i = 0;i<r;i++){
int curl = 0;
for(int w : walls[i]){
int lef = sums[i]-curl;
lef=l-lef;
int right = curl+w-1;
for(int a = lef;a<=right;a++){
val[a]=1;
}
curl+=w;
}
}
int ans = 0;
for(int i = 0;i<l;i++){
ans+=val[i];
}
cout << ans;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
233 ms |
262144 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
233 ms |
262144 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
2640 KB |
Output is correct |
2 |
Correct |
6 ms |
1748 KB |
Output is correct |
3 |
Correct |
7 ms |
1872 KB |
Output is correct |
4 |
Correct |
17 ms |
3312 KB |
Output is correct |
5 |
Correct |
13 ms |
2256 KB |
Output is correct |
6 |
Correct |
19 ms |
4544 KB |
Output is correct |
7 |
Correct |
2 ms |
1104 KB |
Output is correct |
8 |
Correct |
23 ms |
5200 KB |
Output is correct |
9 |
Correct |
11 ms |
2512 KB |
Output is correct |
10 |
Correct |
23 ms |
3500 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
592 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
8 |
Correct |
1 ms |
336 KB |
Output is correct |
9 |
Correct |
1 ms |
336 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
2640 KB |
Output is correct |
2 |
Correct |
6 ms |
1748 KB |
Output is correct |
3 |
Correct |
7 ms |
1872 KB |
Output is correct |
4 |
Correct |
17 ms |
3312 KB |
Output is correct |
5 |
Correct |
13 ms |
2256 KB |
Output is correct |
6 |
Correct |
19 ms |
4544 KB |
Output is correct |
7 |
Correct |
2 ms |
1104 KB |
Output is correct |
8 |
Correct |
23 ms |
5200 KB |
Output is correct |
9 |
Correct |
11 ms |
2512 KB |
Output is correct |
10 |
Correct |
23 ms |
3500 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
336 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
592 KB |
Output is correct |
16 |
Correct |
1 ms |
336 KB |
Output is correct |
17 |
Correct |
1 ms |
336 KB |
Output is correct |
18 |
Correct |
1 ms |
336 KB |
Output is correct |
19 |
Correct |
1 ms |
336 KB |
Output is correct |
20 |
Correct |
1 ms |
336 KB |
Output is correct |
21 |
Execution timed out |
1064 ms |
34600 KB |
Time limit exceeded |
22 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
233 ms |
262144 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |