# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
648625 | ymm | Election (BOI18_election) | C++17 | 471 ms | 27748 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>
#define Loop(x,l,r) for (ll x = (l); x < (ll)(r); ++x)
#define LoopR(x,l,r) for (ll x = (r)-1; x >= (ll)(l); --x)
typedef long long ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll , ll > pll;
using namespace std;
const int N = 500'010;
struct node {
int mnl, mnr, mns;
} seg[N*4];
string s;
int pre[N], suf[N];
int n;
node merge(node x, node y)
{
node ans;
ans.mnl = min(x.mnl, y.mnl);
ans.mnr = min(x.mnr, y.mnr);
ans.mns = min({x.mns, y.mns, x.mnl + y.mnr});
return ans;
}
void build(int i, int b, int e)
{
if (e-b == 1) {
seg[i].mnl = pre[b];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |