Submission #1062741

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10627412024-08-17 10:14:58damjandavkovWall (IOI14_wall)C++17
100 / 100
932 ms91988 KiB
#include "wall.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> mx, mn, wl, wr;
int p, dp, r = 2147483647;
void ac(int i, int x, int n)
{
if (x > mn[i])
mx[i] = mn[i] = x;
else if (n < mx[i])
mx[i] = mn[i] = n;
else
{
mx[i] = max(mx[i], x);
mn[i] = min(mn[i], n);
}
}
void push(int i)
{
if (i >= p)
return;
ac(i << 1, mx[i], mn[i]);
ac((i << 1) ^ 1, mx[i], mn[i]);
mx[i] = 0;
mn[i] = r;
}
void upd(int l, int r, int i, int x, int n)
{
push(i);
if (wl[i] >= r || wr[i] <= l)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...