#include "light.h"
#include <bits/stdc++.h>
#define pb push_back
#define int long long
using namespace std;
const int N=705;
bool a[N];
int n;
void prepare(){
a[1]=1;
n=1;
}
std::pair<long long, std::vector<long long>> join(long long p){
n+=p;
memset(a,0,sizeof(a));
for (int i=1;i<=n;i+=5) a[i]=1;
a[n]=1;
vector<int> v;
for (int i=1;i<=n;i++) if (a[i]) v.pb(i);
return {p,v};
}
std::pair<long long, std::vector<long long>> leave(long long p){
n-=p;
memset(a,0,sizeof(a));
for (int i=1;i<=n;i+=5) a[i]=1;
a[n]=1;
vector<int> v;
for (int i=1;i<=n;i++) if (a[i]) v.pb(i);
return {5,v};
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Runtime error |
1 ms |
424 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
339 ms |
344 KB |
Output is correct |
3 |
Correct |
52 ms |
344 KB |
Output is correct |
4 |
Correct |
318 ms |
468 KB |
Output is correct |
5 |
Correct |
328 ms |
344 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
301 ms |
344 KB |
Output is correct |
8 |
Correct |
14 ms |
344 KB |
Output is correct |
9 |
Correct |
337 ms |
592 KB |
Output is correct |
10 |
Correct |
332 ms |
600 KB |
Output is correct |
11 |
Correct |
89 ms |
344 KB |
Correct |
12 |
Correct |
283 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
339 ms |
344 KB |
Output is correct |
3 |
Correct |
52 ms |
344 KB |
Output is correct |
4 |
Correct |
318 ms |
468 KB |
Output is correct |
5 |
Correct |
328 ms |
344 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
301 ms |
344 KB |
Output is correct |
8 |
Correct |
14 ms |
344 KB |
Output is correct |
9 |
Correct |
337 ms |
592 KB |
Output is correct |
10 |
Correct |
332 ms |
600 KB |
Output is correct |
11 |
Correct |
89 ms |
344 KB |
Correct |
12 |
Correct |
283 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
311 ms |
600 KB |
Output is correct |
15 |
Correct |
48 ms |
344 KB |
Output is correct |
16 |
Correct |
316 ms |
344 KB |
Output is correct |
17 |
Correct |
355 ms |
344 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
332 ms |
344 KB |
Output is correct |
20 |
Correct |
18 ms |
344 KB |
Output is correct |
21 |
Correct |
344 ms |
864 KB |
Output is correct |
22 |
Correct |
328 ms |
344 KB |
Output is correct |
23 |
Correct |
95 ms |
344 KB |
Correct |
24 |
Correct |
335 ms |
472 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 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 |
339 ms |
344 KB |
Output is correct |
3 |
Correct |
52 ms |
344 KB |
Output is correct |
4 |
Correct |
318 ms |
468 KB |
Output is correct |
5 |
Correct |
328 ms |
344 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
301 ms |
344 KB |
Output is correct |
8 |
Correct |
14 ms |
344 KB |
Output is correct |
9 |
Correct |
337 ms |
592 KB |
Output is correct |
10 |
Correct |
332 ms |
600 KB |
Output is correct |
11 |
Correct |
89 ms |
344 KB |
Correct |
12 |
Correct |
283 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
311 ms |
600 KB |
Output is correct |
15 |
Correct |
48 ms |
344 KB |
Output is correct |
16 |
Correct |
316 ms |
344 KB |
Output is correct |
17 |
Correct |
355 ms |
344 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
332 ms |
344 KB |
Output is correct |
20 |
Correct |
18 ms |
344 KB |
Output is correct |
21 |
Correct |
344 ms |
864 KB |
Output is correct |
22 |
Correct |
328 ms |
344 KB |
Output is correct |
23 |
Correct |
95 ms |
344 KB |
Correct |
24 |
Correct |
335 ms |
472 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 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 |
339 ms |
344 KB |
Output is correct |
3 |
Correct |
52 ms |
344 KB |
Output is correct |
4 |
Correct |
318 ms |
468 KB |
Output is correct |
5 |
Correct |
328 ms |
344 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
301 ms |
344 KB |
Output is correct |
8 |
Correct |
14 ms |
344 KB |
Output is correct |
9 |
Correct |
337 ms |
592 KB |
Output is correct |
10 |
Correct |
332 ms |
600 KB |
Output is correct |
11 |
Correct |
89 ms |
344 KB |
Correct |
12 |
Correct |
283 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
311 ms |
600 KB |
Output is correct |
15 |
Correct |
48 ms |
344 KB |
Output is correct |
16 |
Correct |
316 ms |
344 KB |
Output is correct |
17 |
Correct |
355 ms |
344 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
332 ms |
344 KB |
Output is correct |
20 |
Correct |
18 ms |
344 KB |
Output is correct |
21 |
Correct |
344 ms |
864 KB |
Output is correct |
22 |
Correct |
328 ms |
344 KB |
Output is correct |
23 |
Correct |
95 ms |
344 KB |
Correct |
24 |
Correct |
335 ms |
472 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 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 |
339 ms |
344 KB |
Output is correct |
3 |
Correct |
52 ms |
344 KB |
Output is correct |
4 |
Correct |
318 ms |
468 KB |
Output is correct |
5 |
Correct |
328 ms |
344 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Correct |
7 |
Correct |
301 ms |
344 KB |
Output is correct |
8 |
Correct |
14 ms |
344 KB |
Output is correct |
9 |
Correct |
337 ms |
592 KB |
Output is correct |
10 |
Correct |
332 ms |
600 KB |
Output is correct |
11 |
Correct |
89 ms |
344 KB |
Correct |
12 |
Correct |
283 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
311 ms |
600 KB |
Output is correct |
15 |
Correct |
48 ms |
344 KB |
Output is correct |
16 |
Correct |
316 ms |
344 KB |
Output is correct |
17 |
Correct |
355 ms |
344 KB |
Output is correct |
18 |
Correct |
6 ms |
344 KB |
Correct |
19 |
Correct |
332 ms |
344 KB |
Output is correct |
20 |
Correct |
18 ms |
344 KB |
Output is correct |
21 |
Correct |
344 ms |
864 KB |
Output is correct |
22 |
Correct |
328 ms |
344 KB |
Output is correct |
23 |
Correct |
95 ms |
344 KB |
Correct |
24 |
Correct |
335 ms |
472 KB |
Output is correct |
25 |
Incorrect |
0 ms |
344 KB |
Not correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
1 ms |
344 KB |
Partially correct |
2 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |