#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;
iv join(long long p){
cnt+=p;
vector<long long> v;
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;
vector<long long> v;
for(int i=1;i<=cnt;i+=5) {
v.push_back(i);
}
if (cnt%5!=1){
v.push_back(cnt);
}
return iv(5,v);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Runtime error |
643 ms |
1048576 KB |
Execution killed with signal 9 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
279 ms |
964 KB |
Output is correct |
3 |
Correct |
46 ms |
600 KB |
Output is correct |
4 |
Correct |
257 ms |
344 KB |
Output is correct |
5 |
Correct |
282 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
270 ms |
716 KB |
Output is correct |
8 |
Correct |
20 ms |
600 KB |
Output is correct |
9 |
Correct |
253 ms |
856 KB |
Output is correct |
10 |
Correct |
260 ms |
344 KB |
Output is correct |
11 |
Correct |
65 ms |
344 KB |
Correct |
12 |
Correct |
239 ms |
472 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
279 ms |
964 KB |
Output is correct |
3 |
Correct |
46 ms |
600 KB |
Output is correct |
4 |
Correct |
257 ms |
344 KB |
Output is correct |
5 |
Correct |
282 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
270 ms |
716 KB |
Output is correct |
8 |
Correct |
20 ms |
600 KB |
Output is correct |
9 |
Correct |
253 ms |
856 KB |
Output is correct |
10 |
Correct |
260 ms |
344 KB |
Output is correct |
11 |
Correct |
65 ms |
344 KB |
Correct |
12 |
Correct |
239 ms |
472 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
245 ms |
344 KB |
Output is correct |
15 |
Correct |
33 ms |
476 KB |
Output is correct |
16 |
Correct |
247 ms |
344 KB |
Output is correct |
17 |
Correct |
265 ms |
760 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
276 ms |
344 KB |
Output is correct |
20 |
Correct |
19 ms |
456 KB |
Output is correct |
21 |
Correct |
222 ms |
448 KB |
Output is correct |
22 |
Correct |
287 ms |
600 KB |
Output is correct |
23 |
Correct |
58 ms |
344 KB |
Correct |
24 |
Correct |
260 ms |
344 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
279 ms |
964 KB |
Output is correct |
3 |
Correct |
46 ms |
600 KB |
Output is correct |
4 |
Correct |
257 ms |
344 KB |
Output is correct |
5 |
Correct |
282 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
270 ms |
716 KB |
Output is correct |
8 |
Correct |
20 ms |
600 KB |
Output is correct |
9 |
Correct |
253 ms |
856 KB |
Output is correct |
10 |
Correct |
260 ms |
344 KB |
Output is correct |
11 |
Correct |
65 ms |
344 KB |
Correct |
12 |
Correct |
239 ms |
472 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
245 ms |
344 KB |
Output is correct |
15 |
Correct |
33 ms |
476 KB |
Output is correct |
16 |
Correct |
247 ms |
344 KB |
Output is correct |
17 |
Correct |
265 ms |
760 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
276 ms |
344 KB |
Output is correct |
20 |
Correct |
19 ms |
456 KB |
Output is correct |
21 |
Correct |
222 ms |
448 KB |
Output is correct |
22 |
Correct |
287 ms |
600 KB |
Output is correct |
23 |
Correct |
58 ms |
344 KB |
Correct |
24 |
Correct |
260 ms |
344 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
279 ms |
964 KB |
Output is correct |
3 |
Correct |
46 ms |
600 KB |
Output is correct |
4 |
Correct |
257 ms |
344 KB |
Output is correct |
5 |
Correct |
282 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
270 ms |
716 KB |
Output is correct |
8 |
Correct |
20 ms |
600 KB |
Output is correct |
9 |
Correct |
253 ms |
856 KB |
Output is correct |
10 |
Correct |
260 ms |
344 KB |
Output is correct |
11 |
Correct |
65 ms |
344 KB |
Correct |
12 |
Correct |
239 ms |
472 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
245 ms |
344 KB |
Output is correct |
15 |
Correct |
33 ms |
476 KB |
Output is correct |
16 |
Correct |
247 ms |
344 KB |
Output is correct |
17 |
Correct |
265 ms |
760 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
276 ms |
344 KB |
Output is correct |
20 |
Correct |
19 ms |
456 KB |
Output is correct |
21 |
Correct |
222 ms |
448 KB |
Output is correct |
22 |
Correct |
287 ms |
600 KB |
Output is correct |
23 |
Correct |
58 ms |
344 KB |
Correct |
24 |
Correct |
260 ms |
344 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
279 ms |
964 KB |
Output is correct |
3 |
Correct |
46 ms |
600 KB |
Output is correct |
4 |
Correct |
257 ms |
344 KB |
Output is correct |
5 |
Correct |
282 ms |
600 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
270 ms |
716 KB |
Output is correct |
8 |
Correct |
20 ms |
600 KB |
Output is correct |
9 |
Correct |
253 ms |
856 KB |
Output is correct |
10 |
Correct |
260 ms |
344 KB |
Output is correct |
11 |
Correct |
65 ms |
344 KB |
Correct |
12 |
Correct |
239 ms |
472 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
245 ms |
344 KB |
Output is correct |
15 |
Correct |
33 ms |
476 KB |
Output is correct |
16 |
Correct |
247 ms |
344 KB |
Output is correct |
17 |
Correct |
265 ms |
760 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
276 ms |
344 KB |
Output is correct |
20 |
Correct |
19 ms |
456 KB |
Output is correct |
21 |
Correct |
222 ms |
448 KB |
Output is correct |
22 |
Correct |
287 ms |
600 KB |
Output is correct |
23 |
Correct |
58 ms |
344 KB |
Correct |
24 |
Correct |
260 ms |
344 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
0 ms |
504 KB |
Partially correct |
2 |
Runtime error |
585 ms |
1048576 KB |
Execution killed with signal 9 |
3 |
Halted |
0 ms |
0 KB |
- |