#include "light.h"
#include <bits/stdc++.h>
using namespace std;
int 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 {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 {4, v};
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Runtime error |
633 ms |
1048576 KB |
Execution killed with signal 9 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
271 ms |
344 KB |
Output is correct |
3 |
Correct |
38 ms |
344 KB |
Output is correct |
4 |
Correct |
254 ms |
472 KB |
Output is correct |
5 |
Correct |
293 ms |
472 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Correct |
7 |
Correct |
256 ms |
344 KB |
Output is correct |
8 |
Correct |
15 ms |
344 KB |
Output is correct |
9 |
Correct |
276 ms |
460 KB |
Output is correct |
10 |
Correct |
265 ms |
344 KB |
Output is correct |
11 |
Correct |
75 ms |
344 KB |
Correct |
12 |
Correct |
244 ms |
596 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
271 ms |
344 KB |
Output is correct |
3 |
Correct |
38 ms |
344 KB |
Output is correct |
4 |
Correct |
254 ms |
472 KB |
Output is correct |
5 |
Correct |
293 ms |
472 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Correct |
7 |
Correct |
256 ms |
344 KB |
Output is correct |
8 |
Correct |
15 ms |
344 KB |
Output is correct |
9 |
Correct |
276 ms |
460 KB |
Output is correct |
10 |
Correct |
265 ms |
344 KB |
Output is correct |
11 |
Correct |
75 ms |
344 KB |
Correct |
12 |
Correct |
244 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
253 ms |
344 KB |
Output is correct |
15 |
Correct |
41 ms |
344 KB |
Output is correct |
16 |
Correct |
270 ms |
476 KB |
Output is correct |
17 |
Correct |
277 ms |
344 KB |
Output is correct |
18 |
Correct |
7 ms |
344 KB |
Correct |
19 |
Correct |
300 ms |
344 KB |
Output is correct |
20 |
Correct |
19 ms |
344 KB |
Output is correct |
21 |
Correct |
235 ms |
680 KB |
Output is correct |
22 |
Correct |
262 ms |
344 KB |
Output is correct |
23 |
Correct |
73 ms |
344 KB |
Correct |
24 |
Correct |
249 ms |
468 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
271 ms |
344 KB |
Output is correct |
3 |
Correct |
38 ms |
344 KB |
Output is correct |
4 |
Correct |
254 ms |
472 KB |
Output is correct |
5 |
Correct |
293 ms |
472 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Correct |
7 |
Correct |
256 ms |
344 KB |
Output is correct |
8 |
Correct |
15 ms |
344 KB |
Output is correct |
9 |
Correct |
276 ms |
460 KB |
Output is correct |
10 |
Correct |
265 ms |
344 KB |
Output is correct |
11 |
Correct |
75 ms |
344 KB |
Correct |
12 |
Correct |
244 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
253 ms |
344 KB |
Output is correct |
15 |
Correct |
41 ms |
344 KB |
Output is correct |
16 |
Correct |
270 ms |
476 KB |
Output is correct |
17 |
Correct |
277 ms |
344 KB |
Output is correct |
18 |
Correct |
7 ms |
344 KB |
Correct |
19 |
Correct |
300 ms |
344 KB |
Output is correct |
20 |
Correct |
19 ms |
344 KB |
Output is correct |
21 |
Correct |
235 ms |
680 KB |
Output is correct |
22 |
Correct |
262 ms |
344 KB |
Output is correct |
23 |
Correct |
73 ms |
344 KB |
Correct |
24 |
Correct |
249 ms |
468 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
271 ms |
344 KB |
Output is correct |
3 |
Correct |
38 ms |
344 KB |
Output is correct |
4 |
Correct |
254 ms |
472 KB |
Output is correct |
5 |
Correct |
293 ms |
472 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Correct |
7 |
Correct |
256 ms |
344 KB |
Output is correct |
8 |
Correct |
15 ms |
344 KB |
Output is correct |
9 |
Correct |
276 ms |
460 KB |
Output is correct |
10 |
Correct |
265 ms |
344 KB |
Output is correct |
11 |
Correct |
75 ms |
344 KB |
Correct |
12 |
Correct |
244 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
253 ms |
344 KB |
Output is correct |
15 |
Correct |
41 ms |
344 KB |
Output is correct |
16 |
Correct |
270 ms |
476 KB |
Output is correct |
17 |
Correct |
277 ms |
344 KB |
Output is correct |
18 |
Correct |
7 ms |
344 KB |
Correct |
19 |
Correct |
300 ms |
344 KB |
Output is correct |
20 |
Correct |
19 ms |
344 KB |
Output is correct |
21 |
Correct |
235 ms |
680 KB |
Output is correct |
22 |
Correct |
262 ms |
344 KB |
Output is correct |
23 |
Correct |
73 ms |
344 KB |
Correct |
24 |
Correct |
249 ms |
468 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
271 ms |
344 KB |
Output is correct |
3 |
Correct |
38 ms |
344 KB |
Output is correct |
4 |
Correct |
254 ms |
472 KB |
Output is correct |
5 |
Correct |
293 ms |
472 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Correct |
7 |
Correct |
256 ms |
344 KB |
Output is correct |
8 |
Correct |
15 ms |
344 KB |
Output is correct |
9 |
Correct |
276 ms |
460 KB |
Output is correct |
10 |
Correct |
265 ms |
344 KB |
Output is correct |
11 |
Correct |
75 ms |
344 KB |
Correct |
12 |
Correct |
244 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
253 ms |
344 KB |
Output is correct |
15 |
Correct |
41 ms |
344 KB |
Output is correct |
16 |
Correct |
270 ms |
476 KB |
Output is correct |
17 |
Correct |
277 ms |
344 KB |
Output is correct |
18 |
Correct |
7 ms |
344 KB |
Correct |
19 |
Correct |
300 ms |
344 KB |
Output is correct |
20 |
Correct |
19 ms |
344 KB |
Output is correct |
21 |
Correct |
235 ms |
680 KB |
Output is correct |
22 |
Correct |
262 ms |
344 KB |
Output is correct |
23 |
Correct |
73 ms |
344 KB |
Correct |
24 |
Correct |
249 ms |
468 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
1 ms |
344 KB |
Partially correct |
2 |
Runtime error |
614 ms |
1048576 KB |
Execution killed with signal 9 |
3 |
Halted |
0 ms |
0 KB |
- |