# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
927936 | TAhmed33 | Crossing (JOI21_crossing) | C++98 | 844 ms | 46848 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;
#define int __int128
#define mid ((l + r) >> 1)
#define tl (node + 1)
#define tr (node + 2 * (mid - l + 1))
const int MOD = (1ll << 61) - 1;
const int b = 1e9 + 7;
map <char, int> ll = {
{'J', 0},
{'O', 1},
{'I', 2}
};
long long n;
const int MAXN = 200025;
int pw[MAXN];
int inv[MAXN];
int sub (int a, int b) {
if (!b) return pw[a];
return (pw[a] - pw[b - 1] + MOD) % MOD;
}
struct SegmentTree {
int tree[2 * MAXN], lazy[2 * MAXN];
void prop (int l, int r, int node) {
if (-1 == lazy[node]) return;
if (l == r) {
tree[node] = (lazy[node] * sub(l, l)) % MOD;
lazy[node] = -1;
return;
}
# | 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... |