Submission #1195882

#TimeUsernameProblemLanguageResultExecution timeMemory
1195882raphaelpA Light Inconvenience (CEOI23_light)C++20
0 / 100
0 ms408 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...