# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
864323 | Blagoj | Crossing (JOI21_crossing) | C++17 | 2487 ms | 77044 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 endl '\n'
#define ll long long
#define all(x) x.begin(), x.end()
int n;
string t;
struct SegmentTree {
string s;
vector<int> sgt, lz;
vector<char> let, slet;
void build(int k = 1, int l = 0, int r = n - 1) {
if (l == r) {
let[k] = t[l];
if (t[l] == s[l]) sgt[k] = 1;
else sgt[k] = 0;
slet[k] = s[l];
return;
}
int m = (l + r) / 2;
build(k * 2, l, m);
build(k * 2 + 1, m + 1, r);
sgt[k] = sgt[k * 2] * sgt[k * 2 + 1];
let[k] = 'z';
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |