#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(max(p,5LL),v[cnt]);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
856 KB |
Output is correct |
2 |
Runtime error |
1 ms |
1524 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
253 ms |
856 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
257 ms |
856 KB |
Output is correct |
5 |
Correct |
247 ms |
1048 KB |
Output is correct |
6 |
Correct |
5 ms |
1108 KB |
Output is correct |
7 |
Correct |
278 ms |
856 KB |
Output is correct |
8 |
Correct |
17 ms |
856 KB |
Output is correct |
9 |
Correct |
231 ms |
1032 KB |
Output is correct |
10 |
Correct |
226 ms |
1108 KB |
Output is correct |
11 |
Correct |
63 ms |
1108 KB |
Output is correct |
12 |
Correct |
223 ms |
856 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
253 ms |
856 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
257 ms |
856 KB |
Output is correct |
5 |
Correct |
247 ms |
1048 KB |
Output is correct |
6 |
Correct |
5 ms |
1108 KB |
Output is correct |
7 |
Correct |
278 ms |
856 KB |
Output is correct |
8 |
Correct |
17 ms |
856 KB |
Output is correct |
9 |
Correct |
231 ms |
1032 KB |
Output is correct |
10 |
Correct |
226 ms |
1108 KB |
Output is correct |
11 |
Correct |
63 ms |
1108 KB |
Output is correct |
12 |
Correct |
223 ms |
856 KB |
Output is correct |
13 |
Correct |
0 ms |
856 KB |
Output is correct |
14 |
Correct |
243 ms |
1112 KB |
Output is correct |
15 |
Correct |
37 ms |
856 KB |
Output is correct |
16 |
Correct |
246 ms |
856 KB |
Output is correct |
17 |
Correct |
267 ms |
1052 KB |
Output is correct |
18 |
Correct |
7 ms |
856 KB |
Output is correct |
19 |
Correct |
232 ms |
856 KB |
Output is correct |
20 |
Correct |
17 ms |
856 KB |
Output is correct |
21 |
Correct |
273 ms |
856 KB |
Output is correct |
22 |
Correct |
246 ms |
856 KB |
Output is correct |
23 |
Correct |
66 ms |
1020 KB |
Output is correct |
24 |
Correct |
227 ms |
856 KB |
Output is correct |
25 |
Runtime error |
2 ms |
1624 KB |
Execution killed with signal 11 |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
253 ms |
856 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
257 ms |
856 KB |
Output is correct |
5 |
Correct |
247 ms |
1048 KB |
Output is correct |
6 |
Correct |
5 ms |
1108 KB |
Output is correct |
7 |
Correct |
278 ms |
856 KB |
Output is correct |
8 |
Correct |
17 ms |
856 KB |
Output is correct |
9 |
Correct |
231 ms |
1032 KB |
Output is correct |
10 |
Correct |
226 ms |
1108 KB |
Output is correct |
11 |
Correct |
63 ms |
1108 KB |
Output is correct |
12 |
Correct |
223 ms |
856 KB |
Output is correct |
13 |
Correct |
0 ms |
856 KB |
Output is correct |
14 |
Correct |
243 ms |
1112 KB |
Output is correct |
15 |
Correct |
37 ms |
856 KB |
Output is correct |
16 |
Correct |
246 ms |
856 KB |
Output is correct |
17 |
Correct |
267 ms |
1052 KB |
Output is correct |
18 |
Correct |
7 ms |
856 KB |
Output is correct |
19 |
Correct |
232 ms |
856 KB |
Output is correct |
20 |
Correct |
17 ms |
856 KB |
Output is correct |
21 |
Correct |
273 ms |
856 KB |
Output is correct |
22 |
Correct |
246 ms |
856 KB |
Output is correct |
23 |
Correct |
66 ms |
1020 KB |
Output is correct |
24 |
Correct |
227 ms |
856 KB |
Output is correct |
25 |
Runtime error |
2 ms |
1624 KB |
Execution killed with signal 11 |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
253 ms |
856 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
257 ms |
856 KB |
Output is correct |
5 |
Correct |
247 ms |
1048 KB |
Output is correct |
6 |
Correct |
5 ms |
1108 KB |
Output is correct |
7 |
Correct |
278 ms |
856 KB |
Output is correct |
8 |
Correct |
17 ms |
856 KB |
Output is correct |
9 |
Correct |
231 ms |
1032 KB |
Output is correct |
10 |
Correct |
226 ms |
1108 KB |
Output is correct |
11 |
Correct |
63 ms |
1108 KB |
Output is correct |
12 |
Correct |
223 ms |
856 KB |
Output is correct |
13 |
Correct |
0 ms |
856 KB |
Output is correct |
14 |
Correct |
243 ms |
1112 KB |
Output is correct |
15 |
Correct |
37 ms |
856 KB |
Output is correct |
16 |
Correct |
246 ms |
856 KB |
Output is correct |
17 |
Correct |
267 ms |
1052 KB |
Output is correct |
18 |
Correct |
7 ms |
856 KB |
Output is correct |
19 |
Correct |
232 ms |
856 KB |
Output is correct |
20 |
Correct |
17 ms |
856 KB |
Output is correct |
21 |
Correct |
273 ms |
856 KB |
Output is correct |
22 |
Correct |
246 ms |
856 KB |
Output is correct |
23 |
Correct |
66 ms |
1020 KB |
Output is correct |
24 |
Correct |
227 ms |
856 KB |
Output is correct |
25 |
Runtime error |
2 ms |
1624 KB |
Execution killed with signal 11 |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
856 KB |
Output is correct |
2 |
Correct |
253 ms |
856 KB |
Output is correct |
3 |
Correct |
42 ms |
856 KB |
Output is correct |
4 |
Correct |
257 ms |
856 KB |
Output is correct |
5 |
Correct |
247 ms |
1048 KB |
Output is correct |
6 |
Correct |
5 ms |
1108 KB |
Output is correct |
7 |
Correct |
278 ms |
856 KB |
Output is correct |
8 |
Correct |
17 ms |
856 KB |
Output is correct |
9 |
Correct |
231 ms |
1032 KB |
Output is correct |
10 |
Correct |
226 ms |
1108 KB |
Output is correct |
11 |
Correct |
63 ms |
1108 KB |
Output is correct |
12 |
Correct |
223 ms |
856 KB |
Output is correct |
13 |
Correct |
0 ms |
856 KB |
Output is correct |
14 |
Correct |
243 ms |
1112 KB |
Output is correct |
15 |
Correct |
37 ms |
856 KB |
Output is correct |
16 |
Correct |
246 ms |
856 KB |
Output is correct |
17 |
Correct |
267 ms |
1052 KB |
Output is correct |
18 |
Correct |
7 ms |
856 KB |
Output is correct |
19 |
Correct |
232 ms |
856 KB |
Output is correct |
20 |
Correct |
17 ms |
856 KB |
Output is correct |
21 |
Correct |
273 ms |
856 KB |
Output is correct |
22 |
Correct |
246 ms |
856 KB |
Output is correct |
23 |
Correct |
66 ms |
1020 KB |
Output is correct |
24 |
Correct |
227 ms |
856 KB |
Output is correct |
25 |
Runtime error |
2 ms |
1624 KB |
Execution killed with signal 11 |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
0 ms |
856 KB |
Partially correct |
2 |
Runtime error |
1 ms |
1524 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |