#include "light.h"
#include <bits/stdc++.h>
typedef long long ll;
#define FOR(i,x,y) for(ll i=x; i<y; i++)
#define FORNEG(i,x,y) for(ll i=x; i>y; i--)
using namespace std;
int n;
void prepare(){
n = 1;
}
pair<long long, std::vector<long long>> join(long long p){
n += p;
set<ll> stuff;
stuff.insert(1);
FOR(i, 1, n+1){
ll sus = n+1 - i;
bool flag = 0;
FOR(j,0,30) if ((1<<j) == sus) flag = 1;
if (flag) stuff.insert(i);
}
vector<ll> real;
for (auto&i : stuff) real.push_back(i);
return {p, real};
}
std::pair<long long, std::vector<long long>> leave(long long p){
n -= p;
set<ll> stuff;
stuff.insert(1);
FOR(i, 1, n+1){
ll sus = n+1 - i;
bool flag = 0;
FOR(j,0,30) if ((1<<j) == sus) flag = 1;
if (flag) stuff.insert(i);
}
vector<ll> real;
for (auto&i : stuff) real.push_back(i);
return {p, real};
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Correct |
2 |
Execution timed out |
3068 ms |
344 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
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 |
Correct |
2 |
Execution timed out |
3056 ms |
344 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |