# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
483257 | 2021-10-28T11:16:21 Z | David_M | Brunhilda’s Birthday (BOI13_brunhilda) | C++14 | 147 ms | 262148 KB |
#include <bits/stdc++.h> #define ll long long using namespace std; const ll N=20000000; ll m, q, x, u=N, a[N+5], b[N+5], j; main(){ cin>>m>>q; for (int i=1; i<=u+1; i++)a[i]=b[i]=u; for (int i=1; i<=m&&!(j*=0); i++) for (cin>>x; j+x-1<=u; j+=x)a[j+x-1]=min(a[j+x-1],j); for (int i=u; i; i--)a[i]=min(a[i],a[i+1]); for (int i=1; i<=u; i++)b[i]=b[a[i]]+1; while(cin>>x) if(b[x]<u)cout<<b[x]<<'\n'; else cout<<"oo\n"; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 102 ms | 262148 KB | Execution killed with signal 9 |
2 | Runtime error | 97 ms | 262148 KB | Execution killed with signal 9 |
3 | Runtime error | 101 ms | 262148 KB | Execution killed with signal 9 |
4 | Runtime error | 110 ms | 262148 KB | Execution killed with signal 9 |
5 | Runtime error | 102 ms | 262148 KB | Execution killed with signal 9 |
6 | Runtime error | 103 ms | 262148 KB | Execution killed with signal 9 |
7 | Runtime error | 95 ms | 262148 KB | Execution killed with signal 9 |
8 | Runtime error | 102 ms | 262148 KB | Execution killed with signal 9 |
9 | Runtime error | 100 ms | 262148 KB | Execution killed with signal 9 |
10 | Runtime error | 100 ms | 262148 KB | Execution killed with signal 9 |
11 | Runtime error | 103 ms | 262148 KB | Execution killed with signal 9 |
12 | Runtime error | 108 ms | 262148 KB | Execution killed with signal 9 |
13 | Runtime error | 102 ms | 262148 KB | Execution killed with signal 9 |
14 | Runtime error | 100 ms | 262148 KB | Execution killed with signal 9 |
15 | Runtime error | 96 ms | 262148 KB | Execution killed with signal 9 |
16 | Runtime error | 105 ms | 262148 KB | Execution killed with signal 9 |
17 | Runtime error | 99 ms | 262148 KB | Execution killed with signal 9 |
18 | Runtime error | 99 ms | 262148 KB | Execution killed with signal 9 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 102 ms | 262148 KB | Execution killed with signal 9 |
2 | Runtime error | 95 ms | 262148 KB | Execution killed with signal 9 |
3 | Runtime error | 102 ms | 262148 KB | Execution killed with signal 9 |
4 | Runtime error | 98 ms | 262148 KB | Execution killed with signal 9 |
5 | Runtime error | 99 ms | 262148 KB | Execution killed with signal 9 |
6 | Runtime error | 103 ms | 262148 KB | Execution killed with signal 9 |
7 | Runtime error | 104 ms | 262148 KB | Execution killed with signal 9 |
8 | Runtime error | 97 ms | 262148 KB | Execution killed with signal 9 |
9 | Runtime error | 99 ms | 262148 KB | Execution killed with signal 9 |
10 | Runtime error | 101 ms | 262148 KB | Execution killed with signal 9 |
11 | Runtime error | 97 ms | 262148 KB | Execution killed with signal 9 |
12 | Runtime error | 96 ms | 262148 KB | Execution killed with signal 9 |
13 | Runtime error | 104 ms | 262148 KB | Execution killed with signal 9 |
14 | Runtime error | 94 ms | 262148 KB | Execution killed with signal 9 |
15 | Runtime error | 97 ms | 262148 KB | Execution killed with signal 9 |
16 | Runtime error | 99 ms | 262148 KB | Execution killed with signal 9 |
17 | Runtime error | 101 ms | 262148 KB | Execution killed with signal 9 |
18 | Runtime error | 102 ms | 262148 KB | Execution killed with signal 9 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 110 ms | 262148 KB | Execution killed with signal 9 |
2 | Runtime error | 101 ms | 262148 KB | Execution killed with signal 9 |
3 | Runtime error | 104 ms | 262148 KB | Execution killed with signal 9 |
4 | Runtime error | 101 ms | 262148 KB | Execution killed with signal 9 |
5 | Runtime error | 97 ms | 262148 KB | Execution killed with signal 9 |
6 | Runtime error | 105 ms | 262148 KB | Execution killed with signal 9 |
7 | Runtime error | 115 ms | 262148 KB | Execution killed with signal 9 |
8 | Runtime error | 110 ms | 262148 KB | Execution killed with signal 9 |
9 | Runtime error | 128 ms | 262148 KB | Execution killed with signal 9 |
10 | Runtime error | 95 ms | 262148 KB | Execution killed with signal 9 |
11 | Runtime error | 101 ms | 262148 KB | Execution killed with signal 9 |
12 | Runtime error | 104 ms | 262148 KB | Execution killed with signal 9 |
13 | Runtime error | 106 ms | 262148 KB | Execution killed with signal 9 |
14 | Runtime error | 106 ms | 262148 KB | Execution killed with signal 9 |
15 | Runtime error | 119 ms | 262148 KB | Execution killed with signal 9 |
16 | Runtime error | 117 ms | 262148 KB | Execution killed with signal 9 |
17 | Runtime error | 103 ms | 262148 KB | Execution killed with signal 9 |
18 | Runtime error | 108 ms | 262148 KB | Execution killed with signal 9 |
19 | Runtime error | 104 ms | 262148 KB | Execution killed with signal 9 |
20 | Runtime error | 115 ms | 262148 KB | Execution killed with signal 9 |
21 | Runtime error | 119 ms | 262148 KB | Execution killed with signal 9 |
22 | Runtime error | 147 ms | 262148 KB | Execution killed with signal 9 |
23 | Runtime error | 108 ms | 262148 KB | Execution killed with signal 9 |
24 | Runtime error | 110 ms | 262148 KB | Execution killed with signal 9 |
25 | Runtime error | 136 ms | 262148 KB | Execution killed with signal 9 |
26 | Runtime error | 101 ms | 262148 KB | Execution killed with signal 9 |
27 | Runtime error | 100 ms | 262148 KB | Execution killed with signal 9 |
28 | Runtime error | 111 ms | 262148 KB | Execution killed with signal 9 |
29 | Runtime error | 109 ms | 262148 KB | Execution killed with signal 9 |
30 | Runtime error | 105 ms | 262148 KB | Execution killed with signal 9 |
31 | Runtime error | 107 ms | 262148 KB | Execution killed with signal 9 |
32 | Runtime error | 109 ms | 262148 KB | Execution killed with signal 9 |
33 | Runtime error | 103 ms | 262148 KB | Execution killed with signal 9 |
34 | Runtime error | 103 ms | 262148 KB | Execution killed with signal 9 |
35 | Runtime error | 104 ms | 262148 KB | Execution killed with signal 9 |
36 | Runtime error | 117 ms | 262148 KB | Execution killed with signal 9 |
37 | Runtime error | 110 ms | 262148 KB | Execution killed with signal 9 |
38 | Runtime error | 104 ms | 262148 KB | Execution killed with signal 9 |
39 | Runtime error | 104 ms | 262148 KB | Execution killed with signal 9 |
40 | Runtime error | 127 ms | 262148 KB | Execution killed with signal 9 |
41 | Runtime error | 102 ms | 262148 KB | Execution killed with signal 9 |
42 | Runtime error | 100 ms | 262148 KB | Execution killed with signal 9 |