# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1122874 | omsincoconut | A Light Inconvenience (CEOI23_light) | C++17 | 264 ms | 436 KiB |
#include "light.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> cur;
void prepare() {
cur = {1};
}
pair<ll, vector<ll>> join(ll p) {
ll cz = cur.back() + p;
vector<ll> newcur;
for (ll i = 1; i <= cz; i *= 2) {
newcur.push_back(i);
newcur.push_back(cz-i+1);
}
sort(newcur.begin(), newcur.end());
newcur.resize(unique(newcur.begin(), newcur.end()) - newcur.begin());
ll t = 0;
for (ll i : newcur) {
t = max(t, i - *(upper_bound(cur.begin(), cur.end(), i) - 1));
}
cur = newcur;
# | 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... |