#include "light.h"
#include <bits/stdc++.h>
using namespace std;
long long cnt;
vector<long long> v[701];
void prepare(){
cnt = 1;
for(int i=1;i<=700;i++) {
for(int j=1;j<=i;j+=5){
v[i].push_back(j);
}
if (i%5!=1) v[i].push_back(i);
}
}
typedef pair<long long, std::vector<long long>> iv;
iv join(long long p){
cnt+=p;
return iv(max(p,5LL),v[cnt]);
}
iv leave(long long p){
cnt-=p;
return iv(5,v[cnt]);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
856 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Runtime error |
2 ms |
1520 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
255 ms |
1112 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
222 ms |
856 KB |
Output is correct |
5 |
Correct |
238 ms |
856 KB |
Output is correct |
6 |
Correct |
5 ms |
1288 KB |
Output is correct |
7 |
Correct |
233 ms |
856 KB |
Output is correct |
8 |
Correct |
16 ms |
856 KB |
Output is correct |
9 |
Correct |
215 ms |
1028 KB |
Output is correct |
10 |
Correct |
261 ms |
856 KB |
Output is correct |
11 |
Correct |
82 ms |
856 KB |
Output is correct |
12 |
Correct |
220 ms |
856 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
255 ms |
1112 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
222 ms |
856 KB |
Output is correct |
5 |
Correct |
238 ms |
856 KB |
Output is correct |
6 |
Correct |
5 ms |
1288 KB |
Output is correct |
7 |
Correct |
233 ms |
856 KB |
Output is correct |
8 |
Correct |
16 ms |
856 KB |
Output is correct |
9 |
Correct |
215 ms |
1028 KB |
Output is correct |
10 |
Correct |
261 ms |
856 KB |
Output is correct |
11 |
Correct |
82 ms |
856 KB |
Output is correct |
12 |
Correct |
220 ms |
856 KB |
Output is correct |
13 |
Correct |
1 ms |
856 KB |
Output is correct |
14 |
Correct |
292 ms |
856 KB |
Output is correct |
15 |
Correct |
39 ms |
856 KB |
Output is correct |
16 |
Correct |
229 ms |
856 KB |
Output is correct |
17 |
Correct |
255 ms |
856 KB |
Output is correct |
18 |
Correct |
4 ms |
856 KB |
Output is correct |
19 |
Correct |
271 ms |
1128 KB |
Output is correct |
20 |
Correct |
29 ms |
1112 KB |
Output is correct |
21 |
Correct |
299 ms |
856 KB |
Output is correct |
22 |
Correct |
186 ms |
856 KB |
Output is correct |
23 |
Correct |
71 ms |
856 KB |
Output is correct |
24 |
Correct |
234 ms |
856 KB |
Output is correct |
25 |
Runtime error |
2 ms |
1624 KB |
Execution killed with signal 11 |
26 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
255 ms |
1112 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
222 ms |
856 KB |
Output is correct |
5 |
Correct |
238 ms |
856 KB |
Output is correct |
6 |
Correct |
5 ms |
1288 KB |
Output is correct |
7 |
Correct |
233 ms |
856 KB |
Output is correct |
8 |
Correct |
16 ms |
856 KB |
Output is correct |
9 |
Correct |
215 ms |
1028 KB |
Output is correct |
10 |
Correct |
261 ms |
856 KB |
Output is correct |
11 |
Correct |
82 ms |
856 KB |
Output is correct |
12 |
Correct |
220 ms |
856 KB |
Output is correct |
13 |
Correct |
1 ms |
856 KB |
Output is correct |
14 |
Correct |
292 ms |
856 KB |
Output is correct |
15 |
Correct |
39 ms |
856 KB |
Output is correct |
16 |
Correct |
229 ms |
856 KB |
Output is correct |
17 |
Correct |
255 ms |
856 KB |
Output is correct |
18 |
Correct |
4 ms |
856 KB |
Output is correct |
19 |
Correct |
271 ms |
1128 KB |
Output is correct |
20 |
Correct |
29 ms |
1112 KB |
Output is correct |
21 |
Correct |
299 ms |
856 KB |
Output is correct |
22 |
Correct |
186 ms |
856 KB |
Output is correct |
23 |
Correct |
71 ms |
856 KB |
Output is correct |
24 |
Correct |
234 ms |
856 KB |
Output is correct |
25 |
Runtime error |
2 ms |
1624 KB |
Execution killed with signal 11 |
26 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
255 ms |
1112 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
222 ms |
856 KB |
Output is correct |
5 |
Correct |
238 ms |
856 KB |
Output is correct |
6 |
Correct |
5 ms |
1288 KB |
Output is correct |
7 |
Correct |
233 ms |
856 KB |
Output is correct |
8 |
Correct |
16 ms |
856 KB |
Output is correct |
9 |
Correct |
215 ms |
1028 KB |
Output is correct |
10 |
Correct |
261 ms |
856 KB |
Output is correct |
11 |
Correct |
82 ms |
856 KB |
Output is correct |
12 |
Correct |
220 ms |
856 KB |
Output is correct |
13 |
Correct |
1 ms |
856 KB |
Output is correct |
14 |
Correct |
292 ms |
856 KB |
Output is correct |
15 |
Correct |
39 ms |
856 KB |
Output is correct |
16 |
Correct |
229 ms |
856 KB |
Output is correct |
17 |
Correct |
255 ms |
856 KB |
Output is correct |
18 |
Correct |
4 ms |
856 KB |
Output is correct |
19 |
Correct |
271 ms |
1128 KB |
Output is correct |
20 |
Correct |
29 ms |
1112 KB |
Output is correct |
21 |
Correct |
299 ms |
856 KB |
Output is correct |
22 |
Correct |
186 ms |
856 KB |
Output is correct |
23 |
Correct |
71 ms |
856 KB |
Output is correct |
24 |
Correct |
234 ms |
856 KB |
Output is correct |
25 |
Runtime error |
2 ms |
1624 KB |
Execution killed with signal 11 |
26 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
255 ms |
1112 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
222 ms |
856 KB |
Output is correct |
5 |
Correct |
238 ms |
856 KB |
Output is correct |
6 |
Correct |
5 ms |
1288 KB |
Output is correct |
7 |
Correct |
233 ms |
856 KB |
Output is correct |
8 |
Correct |
16 ms |
856 KB |
Output is correct |
9 |
Correct |
215 ms |
1028 KB |
Output is correct |
10 |
Correct |
261 ms |
856 KB |
Output is correct |
11 |
Correct |
82 ms |
856 KB |
Output is correct |
12 |
Correct |
220 ms |
856 KB |
Output is correct |
13 |
Correct |
1 ms |
856 KB |
Output is correct |
14 |
Correct |
292 ms |
856 KB |
Output is correct |
15 |
Correct |
39 ms |
856 KB |
Output is correct |
16 |
Correct |
229 ms |
856 KB |
Output is correct |
17 |
Correct |
255 ms |
856 KB |
Output is correct |
18 |
Correct |
4 ms |
856 KB |
Output is correct |
19 |
Correct |
271 ms |
1128 KB |
Output is correct |
20 |
Correct |
29 ms |
1112 KB |
Output is correct |
21 |
Correct |
299 ms |
856 KB |
Output is correct |
22 |
Correct |
186 ms |
856 KB |
Output is correct |
23 |
Correct |
71 ms |
856 KB |
Output is correct |
24 |
Correct |
234 ms |
856 KB |
Output is correct |
25 |
Runtime error |
2 ms |
1624 KB |
Execution killed with signal 11 |
26 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
1 ms |
856 KB |
Partially correct |
2 |
Runtime error |
1 ms |
1520 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |