| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1061907 | MilosMilutinovic | A Light Inconvenience (CEOI23_light) | C++17 | 396 ms | 608 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "light.h"
#include <bits/stdc++.h>
using namespace std;
long long n;
void prepare() {
n = 1;
}
pair<long long, vector<long long>> join(long long p) {
n += p;
vector<long long> ids;
for (int b = 0; b < 60; b++) {
long long f = (1LL << b);
if (n - f + 1 > 0) {
ids.push_back(n - f + 1);
}
}
for (int b = 0; b < 60; b++) {
long long f = (1LL << b);
if (f <= n) {
ids.push_back(f);
}
}
sort(ids.begin(), ids.end());
ids.erase(unique(ids.begin(), ids.end()), ids.end());
return {p, ids};
}
pair<long long, vector<long long>> leave(long long p) {
n -= p;
vector<long long> ids;
for (int b = 0; b < 60; b++) {
long long f = (1LL << b);
if (n - f + 1 > 0) {
ids.push_back(n - f + 1);
}
}
for (int b = 0; b < 60; b++) {
long long f = (1LL << b);
if (f <= n) {
ids.push_back(f);
}
}
sort(ids.begin(), ids.end());
ids.erase(unique(ids.begin(), ids.end()), ids.end());
return {p, ids};
}
| # | 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... | ||||
