Submission #1123046

#TimeUsernameProblemLanguageResultExecution timeMemory
112304612345678A Light Inconvenience (CEOI23_light)C++20
5 / 100
185 ms416 KiB
#include "light.h" #include <bits/stdc++.h> using namespace std; long long cnt=1, vs=0; void prepare(){ } std::pair<long long, std::vector<long long>> join(long long p){ cnt+=p; vector<long long> res; if (vs) { res.push_back(cnt); return make_pair(p, 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){ vs=1; cnt-=p; vector<long long> res; res.push_back(cnt); return make_pair(p, res); }
#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...