#include <bits/stdc++.h>
#include "light.h"
using namespace std;
void prepare() {}
int tot = 1;
pair<long long, vector<long long>> join(long long x)
{
pair<long long, vector<long long>> ans;
ans.first = x;
tot += x;
int pos = 1;
int tot2 = tot;
while (tot2 > 1)
{
ans.second.push_back(pos);
pos += tot2 / 2;
tot2 = (tot2 + 1) / 2;
}
ans.second.push_back(pos);
return ans;
}
pair<long long, vector<long long>> leave(long long x)
{
pair<long long, vector<long long>> ans;
ans.first = x;
tot -= x;
int pos = 1;
int tot2 = tot;
while (tot2 > 1)
{
ans.second.push_back(pos);
pos += tot2 / 2;
tot2 = (tot2 + 1) / 2;
}
ans.second.push_back(pos);
return ans;
}
# | 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... |