# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
218026 | manh9203 | Bitaro, who Leaps through Time (JOI19_timeleap) | C++17 | 777 ms | 91188 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 3e5 + 5;
int n, q, L[2][N], R[2][N];
struct node{
ll l, r, pos, cost;
} st[2][4 * N];
node merge(node a, node b){
node res;
if(a.l == a.r){
if(b.l == b.r){
res.l = res.r = a.l;
res.pos = b.pos;
res.cost = a.cost + b.cost + max(0LL, a.pos - b.l);
} else {
res.l = res.r = a.l;
res.pos = min(b.r, max(b.l, a.pos));
res.cost = a.cost + b.cost + max(0LL, a.pos - b.r);
}
} else {
if(b.l == b.r){
if(a.r < b.l){
res.l = res.r = a.r;
res.pos = b.pos;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |