# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
796372 |
2023-07-28T10:30:37 Z |
12345678 |
Lasers (NOI19_lasers) |
C++17 |
|
1000 ms |
6356 KB |
#include <bits/stdc++.h>
using namespace std;
const int nx=5e5+5, mx=1e6+5;
int n, l, x, s[nx], ans;
bool c[mx];
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>l>>n;
for (int i=0; i<n; i++)
{
cin>>s[i];
vector<int> v(s[i]+2);
for (int j=1; j<=s[i]; j++) cin>>v[j], v[j]+=v[j-1];
v[s[i]+1]=INT_MAX;
if (v[s[i]]>(l/2))
{
for (int j=1; j<=v[s[i]]; j++)
{
auto x=*prev(lower_bound(v.begin()+1, v.end(), j));
if ((v[s[i]]-x)>l-j) c[j]=1;
}
}
}
for (int i=1; i<mx; i++) if (c[i]) ans++;
cout<<ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Runtime error |
9 ms |
6356 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Runtime error |
9 ms |
6356 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
74 ms |
1740 KB |
Output is correct |
2 |
Correct |
39 ms |
1436 KB |
Output is correct |
3 |
Correct |
53 ms |
1416 KB |
Output is correct |
4 |
Correct |
82 ms |
1876 KB |
Output is correct |
5 |
Correct |
56 ms |
1788 KB |
Output is correct |
6 |
Correct |
78 ms |
2508 KB |
Output is correct |
7 |
Correct |
19 ms |
1108 KB |
Output is correct |
8 |
Correct |
79 ms |
2044 KB |
Output is correct |
9 |
Correct |
54 ms |
1524 KB |
Output is correct |
10 |
Correct |
77 ms |
1956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
2 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
2 ms |
340 KB |
Output is correct |
8 |
Correct |
2 ms |
340 KB |
Output is correct |
9 |
Correct |
2 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
74 ms |
1740 KB |
Output is correct |
2 |
Correct |
39 ms |
1436 KB |
Output is correct |
3 |
Correct |
53 ms |
1416 KB |
Output is correct |
4 |
Correct |
82 ms |
1876 KB |
Output is correct |
5 |
Correct |
56 ms |
1788 KB |
Output is correct |
6 |
Correct |
78 ms |
2508 KB |
Output is correct |
7 |
Correct |
19 ms |
1108 KB |
Output is correct |
8 |
Correct |
79 ms |
2044 KB |
Output is correct |
9 |
Correct |
54 ms |
1524 KB |
Output is correct |
10 |
Correct |
77 ms |
1956 KB |
Output is correct |
11 |
Correct |
3 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
212 KB |
Output is correct |
13 |
Correct |
2 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
212 KB |
Output is correct |
17 |
Correct |
2 ms |
340 KB |
Output is correct |
18 |
Correct |
2 ms |
340 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Execution timed out |
1082 ms |
1172 KB |
Time limit exceeded |
22 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Runtime error |
9 ms |
6356 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |