#include "light.h"
#include <bits/stdc++.h>
using namespace std;
long long cnt;
void prepare(){
cnt = 1;
}
typedef pair<long long, std::vector<long long>> iv;
vector<long long> v;
iv join(long long p){
cnt+=p;
v.clear();
for(int i=1;i<=cnt;i+=5) {
v.push_back(i);
}
if (cnt%5!=1){
v.push_back(cnt);
}
return iv(p,v);
}
iv leave(long long p){
cnt-=p;
v.clear();
for(int i=1;i<=cnt;i+=5) {
v.push_back(i);
}
if (cnt%5!=1){
v.push_back(cnt);
}
return iv(5,v);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Runtime error |
775 ms |
1048580 KB |
Execution killed with signal 9 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
242 ms |
344 KB |
Output is correct |
3 |
Correct |
45 ms |
344 KB |
Output is correct |
4 |
Correct |
233 ms |
456 KB |
Output is correct |
5 |
Correct |
226 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
596 KB |
Correct |
7 |
Correct |
227 ms |
344 KB |
Output is correct |
8 |
Correct |
13 ms |
344 KB |
Output is correct |
9 |
Correct |
266 ms |
448 KB |
Output is correct |
10 |
Correct |
257 ms |
344 KB |
Output is correct |
11 |
Correct |
73 ms |
344 KB |
Correct |
12 |
Correct |
231 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
242 ms |
344 KB |
Output is correct |
3 |
Correct |
45 ms |
344 KB |
Output is correct |
4 |
Correct |
233 ms |
456 KB |
Output is correct |
5 |
Correct |
226 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
596 KB |
Correct |
7 |
Correct |
227 ms |
344 KB |
Output is correct |
8 |
Correct |
13 ms |
344 KB |
Output is correct |
9 |
Correct |
266 ms |
448 KB |
Output is correct |
10 |
Correct |
257 ms |
344 KB |
Output is correct |
11 |
Correct |
73 ms |
344 KB |
Correct |
12 |
Correct |
231 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
213 ms |
344 KB |
Output is correct |
15 |
Correct |
39 ms |
344 KB |
Output is correct |
16 |
Correct |
246 ms |
344 KB |
Output is correct |
17 |
Correct |
255 ms |
600 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
233 ms |
344 KB |
Output is correct |
20 |
Correct |
14 ms |
344 KB |
Output is correct |
21 |
Correct |
240 ms |
460 KB |
Output is correct |
22 |
Correct |
280 ms |
344 KB |
Output is correct |
23 |
Correct |
63 ms |
344 KB |
Correct |
24 |
Correct |
260 ms |
344 KB |
Output is correct |
25 |
Incorrect |
0 ms |
340 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
242 ms |
344 KB |
Output is correct |
3 |
Correct |
45 ms |
344 KB |
Output is correct |
4 |
Correct |
233 ms |
456 KB |
Output is correct |
5 |
Correct |
226 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
596 KB |
Correct |
7 |
Correct |
227 ms |
344 KB |
Output is correct |
8 |
Correct |
13 ms |
344 KB |
Output is correct |
9 |
Correct |
266 ms |
448 KB |
Output is correct |
10 |
Correct |
257 ms |
344 KB |
Output is correct |
11 |
Correct |
73 ms |
344 KB |
Correct |
12 |
Correct |
231 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
213 ms |
344 KB |
Output is correct |
15 |
Correct |
39 ms |
344 KB |
Output is correct |
16 |
Correct |
246 ms |
344 KB |
Output is correct |
17 |
Correct |
255 ms |
600 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
233 ms |
344 KB |
Output is correct |
20 |
Correct |
14 ms |
344 KB |
Output is correct |
21 |
Correct |
240 ms |
460 KB |
Output is correct |
22 |
Correct |
280 ms |
344 KB |
Output is correct |
23 |
Correct |
63 ms |
344 KB |
Correct |
24 |
Correct |
260 ms |
344 KB |
Output is correct |
25 |
Incorrect |
0 ms |
340 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
242 ms |
344 KB |
Output is correct |
3 |
Correct |
45 ms |
344 KB |
Output is correct |
4 |
Correct |
233 ms |
456 KB |
Output is correct |
5 |
Correct |
226 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
596 KB |
Correct |
7 |
Correct |
227 ms |
344 KB |
Output is correct |
8 |
Correct |
13 ms |
344 KB |
Output is correct |
9 |
Correct |
266 ms |
448 KB |
Output is correct |
10 |
Correct |
257 ms |
344 KB |
Output is correct |
11 |
Correct |
73 ms |
344 KB |
Correct |
12 |
Correct |
231 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
213 ms |
344 KB |
Output is correct |
15 |
Correct |
39 ms |
344 KB |
Output is correct |
16 |
Correct |
246 ms |
344 KB |
Output is correct |
17 |
Correct |
255 ms |
600 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
233 ms |
344 KB |
Output is correct |
20 |
Correct |
14 ms |
344 KB |
Output is correct |
21 |
Correct |
240 ms |
460 KB |
Output is correct |
22 |
Correct |
280 ms |
344 KB |
Output is correct |
23 |
Correct |
63 ms |
344 KB |
Correct |
24 |
Correct |
260 ms |
344 KB |
Output is correct |
25 |
Incorrect |
0 ms |
340 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
242 ms |
344 KB |
Output is correct |
3 |
Correct |
45 ms |
344 KB |
Output is correct |
4 |
Correct |
233 ms |
456 KB |
Output is correct |
5 |
Correct |
226 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
596 KB |
Correct |
7 |
Correct |
227 ms |
344 KB |
Output is correct |
8 |
Correct |
13 ms |
344 KB |
Output is correct |
9 |
Correct |
266 ms |
448 KB |
Output is correct |
10 |
Correct |
257 ms |
344 KB |
Output is correct |
11 |
Correct |
73 ms |
344 KB |
Correct |
12 |
Correct |
231 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
213 ms |
344 KB |
Output is correct |
15 |
Correct |
39 ms |
344 KB |
Output is correct |
16 |
Correct |
246 ms |
344 KB |
Output is correct |
17 |
Correct |
255 ms |
600 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
233 ms |
344 KB |
Output is correct |
20 |
Correct |
14 ms |
344 KB |
Output is correct |
21 |
Correct |
240 ms |
460 KB |
Output is correct |
22 |
Correct |
280 ms |
344 KB |
Output is correct |
23 |
Correct |
63 ms |
344 KB |
Correct |
24 |
Correct |
260 ms |
344 KB |
Output is correct |
25 |
Incorrect |
0 ms |
340 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
0 ms |
344 KB |
Partially correct |
2 |
Runtime error |
587 ms |
1048576 KB |
Execution killed with signal 9 |
3 |
Halted |
0 ms |
0 KB |
- |