#include <bits/stdc++.h>
using namespace std;
#include "light.h"
#define ll long long
#define fi first
#define se second
#define pb push_back
vector<ll> cur;
long long n=1;
void prepare(){
cur.pb(1);
}
std::pair<long long, std::vector<long long>> join(long long p){
cur.clear();
n+=p;
long long i=1;
while(n-i+1>1){
cur.pb(n-i+1);
i*=2;
}
cur.pb(1);
sort(cur.begin(),cur.end());
return {p , cur};
}
std::pair<long long, std::vector<long long>> leave(long long p){
cur.clear();
n-=p;
ll i=1;
while(n-i+1>1){
cur.pb(n-i+1);
i*=2;
}
cur.pb(1);
sort(cur.begin(),cur.end());
return {p, cur};
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Correct |
2 |
Correct |
237 ms |
344 KB |
Correct |
3 |
Correct |
331 ms |
344 KB |
Correct |
4 |
Incorrect |
303 ms |
344 KB |
Not correct |
5 |
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 |
0 ms |
344 KB |
Correct |
2 |
Correct |
274 ms |
344 KB |
Correct |
3 |
Correct |
313 ms |
344 KB |
Correct |
4 |
Incorrect |
294 ms |
344 KB |
Not correct |
5 |
Halted |
0 ms |
0 KB |
- |