#include "light.h"
#include <bits/stdc++.h>
using namespace std;
long long cnt=1;
void prepare(){
}
std::pair<long long, std::vector<long long>> join(long long p){
cnt+=p;
vector<long long> res;
long long pw=2;
while (cnt-pw+2>1)
{
res.push_back(cnt-pw+2);
pw*=2;
}
res.push_back(1);
reverse(res.begin(), res.end());
return make_pair(p, res);
}
std::pair<long long, std::vector<long long>> leave(long long p){
cnt-=p;
vector<long long> res;
long long pw=2;
while (cnt-pw+2>1)
{
res.push_back(cnt-pw+2);
pw*=2;
}
res.push_back(1);
reverse(res.begin(), res.end());
return make_pair(p, res);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |