| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1287281 | AMnu | A Light Inconvenience (CEOI23_light) | C++20 | 145 ms | 432 KiB |
#include "light.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll N;
vector <ll> fire;
void prepare(){
N = 1;
fire.push_back(1);
}
pair<ll,vector<ll>> join(ll p){
N += p;
p = abs(p);
vector <ll> next;
next.push_back(N);
ll last = fire.back();
while (next.back() != 1) {
ll x = max(1LL, N - (N - next.back() + 1) * 2);
while (fire.back() > x) {
last = fire.back();
fire.pop_back();
}
if (x <= fire.back() + p) {
next.push_back(x);
}
else {
next.push_back(last);
}
}
reverse(next.begin(),next.end());
fire = next;
return {p,fire};
}
pair<ll,vector<ll>> leave(ll p){
return join(-p);
}| # | 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... | ||||
