# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1006412 | AdamGS | Bitaro, who Leaps through Time (JOI19_timeleap) | C++17 | 380 ms | 71508 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
struct item {
ll t=0, a=0, b=0, c=0;
};
const ll INF=1e18+7;
const int LIM=3e5+7;
item tr[2][4*LIM];
int N=1;
item merge(item a, item b) {
item x;
x.c=a.c+b.c;
if(a.t==0 && b.t==0) {
x.a=max(a.a, b.a);
x.b=min(a.b, b.b);
if(x.a<=x.b) return x;
if(a.a>b.b) {
x.a=a.a;
x.b=b.b;
x.c+=a.a-b.b;
} else {
x.a=a.b;
x.b=b.a;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |