제출 #1238999

#제출 시각아이디문제언어결과실행 시간메모리
1238999asdfgraceA Light Inconvenience (CEOI23_light)C++20
0 / 100
131 ms416 KiB
#include <bits/stdc++.h> using namespace std; #include "light.h" #define dbg(x) x #define prt(x) dbg(cerr << x) #define pv(x) dbg(cerr << #x << " = " << x << '\n') #define pv2(x) dbg(cerr << #x << " = " << x.first << ',' << x.second << '\n') #define parr(x) dbg(prt(#x << " = { "); for (auto y : x) prt(y << ' '); prt("}\n");) #define parr2(x) dbg(prt(#x << " = { "); for (auto [y, z] : x) prt(y << ',' << z << " "); prt("}\n");) #define parr2d(x) dbg(prt(#x << ":\n"); for (auto arr : x) {parr(arr);} prt('\n')); #define parr2d2(x) dbg(prt(#x << ":\n"); for (auto arr : x) {parr2(arr);} prt('\n')); /* only one call to leave: since you can't know where that is */ bool b; long long n; vector<long long> v; void prepare() { b = false; n = 1; } pair<long long, vector<long long>> join(long long p) { n += p; vector<long long> v2(1, n); for (long long x = 1; x < n - 1; x *= 2) { v2.push_back(n - x); } v2.push_back(1); reverse(v2.begin(), v2.end()); v = v2; return make_pair(p, v2); } pair<long long, vector<long long>> leave(long long p) { b = true; n -= p; while (v.back() >= n) v.pop_back(); v.push_back(n); return make_pair(p, 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...