Submission #796367

# Submission time Handle Problem Language Result Execution time Memory
796367 2023-07-28T10:27:19 Z 12345678 Lasers (NOI19_lasers) C++17
41 / 100
1000 ms 3328 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]+1);
        for (int j=1; j<=s[i]; j++) cin>>v[j], v[j]+=v[j-1];
        if (v[v.size()-1]>(l/2))
        {
            for (int j=1; j<=v[v.size()-1]; j++)
            {
                auto x=*prev(lower_bound(v.begin()+1, v.end(), j));
                if ((v[v.size()-1]-x)>l-j) c[j]=1;
            }
        }
    }
    for (int i=1; i<=l; i++) if (c[i]) ans++;
    cout<<ans;
}
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 468 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 468 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 81 ms 2396 KB Output is correct
2 Correct 42 ms 1548 KB Output is correct
3 Correct 45 ms 1684 KB Output is correct
4 Correct 74 ms 2516 KB Output is correct
5 Correct 56 ms 2172 KB Output is correct
6 Correct 74 ms 3328 KB Output is correct
7 Correct 21 ms 1112 KB Output is correct
8 Correct 85 ms 3112 KB Output is correct
9 Correct 61 ms 1936 KB Output is correct
10 Correct 76 ms 2596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 336 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 81 ms 2396 KB Output is correct
2 Correct 42 ms 1548 KB Output is correct
3 Correct 45 ms 1684 KB Output is correct
4 Correct 74 ms 2516 KB Output is correct
5 Correct 56 ms 2172 KB Output is correct
6 Correct 74 ms 3328 KB Output is correct
7 Correct 21 ms 1112 KB Output is correct
8 Correct 85 ms 3112 KB Output is correct
9 Correct 61 ms 1936 KB Output is correct
10 Correct 76 ms 2596 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 1 ms 336 KB Output is correct
21 Execution timed out 1063 ms 1288 KB Time limit exceeded
22 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 468 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -