#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+=4) 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+=4) 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 |
0 ms |
428 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
1 ms |
344 KB |
Partially correct |
2 |
Runtime error |
0 ms |
432 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |