# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
872354 | bemiko8984 | Bitaro, who Leaps through Time (JOI19_timeleap) | C++14 | 280 ms | 48464 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;
const int maxn = 3e5 + 5;
inline int gi()
{
char c = getchar();
while (c < '0' || c > '9') c = getchar();
int sum = 0;
while ('0' <= c && c <= '9') sum = sum * 10 + c - 48, c = getchar();
return sum;
}
int n, q;
int l[maxn], r[maxn], op[maxn], a[maxn], b[maxn], c[maxn], d[maxn];
ll ans[maxn];
struct node
{
int op, x, y;
ll c;
} seq[maxn], val[maxn << 2];
node operator + (const node &a, const node &b)
{
if (a.op) {
if (b.op) return (node) {1, a.x, b.y, a.c + b.c + max(0, a.y - b.x)};
else return (node) {1, a.x, max(b.x, min(b.y, a.y)), a.c + max(0, a.y - b.y)};
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |