# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
966257 | raspy | Wall (IOI14_wall) | C++14 | 620 ms | 107604 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 "wall.h"
#include <iostream>
#include <stack>
#include <algorithm>
#include <vector>
#define inf 1000000
using namespace std;
vector<pair<int, int>> sg(8000005, pair<int, int>(0, inf));
int a[2000005];
void propagate(int vz, int l, int d)
{
if (l == d)
return;
int lv = vz*2+1, ds = vz*2+2;
sg[lv].first = min(sg[lv].first, sg[vz].second);
sg[lv].second = min(sg[lv].second, sg[vz].second);
sg[lv].first = max(sg[lv].first, sg[vz].first);
sg[lv].second = max(sg[lv].second, sg[vz].first);
sg[ds].first = min(sg[ds].first, sg[vz].second);
sg[ds].second = min(sg[ds].second, sg[vz].second);
sg[ds].first = max(sg[ds].first, sg[vz].first);
sg[ds].second = max(sg[ds].second, sg[vz].first);
sg[vz] = {0, inf};
}
void updmn(int vz, int l, int d, int i, int j, int hg)
# | 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... |