Submission #130504

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1305042019-07-15 11:20:28antimirageWall (IOI14_wall)C++14
100 / 100
1108 ms99528 KiB
#include "wall.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 5;
int mx[N * 4], mn[N * 4], n;
void upd (int v, int val, int t) {
if (t == 1) {
mn[v] = max(mn[v], val);
mx[v] = max(mx[v], val);
}
else {
mn[v] = min(mn[v], val);
mx[v] = min(mx[v], val);
}
}
void push (int v) {
upd(v + v, mx[v], 1);
upd(v + v, mn[v], 2);
upd(v + v + 1, mx[v], 1);
upd(v + v + 1, mn[v], 2);
mx[v] = 0;
mn[v] = 1e9;
}
void update (int l, int r, int val, int t, int v = 1, int tl = 1, int tr = n) {
if (l > tr || tl > r)
return;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...