Submission #1069665

#TimeUsernameProblemLanguageResultExecution timeMemory
1069665AbitoA Light Inconvenience (CEOI23_light)C++17
5 / 100
337 ms432 KiB
#include "light.h" #include <bits/stdc++.h> #define pb push_back #define int long long using namespace std; int n,p[27]; void prepare(){ n=1; p[0]=1; for (int i=1;i<27;i++) p[i]=p[i-1]*5; } std::pair<long long, std::vector<long long>> join(long long x){ n+=x; vector<int> v;v.pb(n); for (int i=1;n-p[i]>0;i++){ v.pb(n-p[i]); } sort(v.begin(),v.end()); if (v[0]!=1) v.pb(1); sort(v.begin(),v.end()); return {x*5,v}; } std::pair<long long, std::vector<long long>> leave(long long x){ n-=x; vector<int> v;v.pb(n); for (int i=1;n-p[i]>0;i++){ v.pb(n-p[i]); } sort(v.begin(),v.end()); if (v[0]!=1) v.pb(1); sort(v.begin(),v.end()); return {x*5,v}; }
#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...