# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
210570 | medk | Seats (IOI18_seats) | C++14 | 4082 ms | 86648 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 "seats.h"
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define x first
#define y second
using namespace std;
int H,W;
vector<int> X,Y;
vector<pair<pair<int,int>,pair<int,int>>> sgt; //X(min,max) Y(min,max)
void build(int p=1, int l=0, int r=H*W-1)
{
if(l==r)
{
sgt[p]={{X[l],X[l]},{Y[l],Y[l]}};
return;
}
int mid=(l+r)/2;
build(p*2,l,mid);
build(p*2+1,mid+1,r);
sgt[p].x.x=min(sgt[p*2].x.x, sgt[p*2+1].x.x);
sgt[p].y.x=min(sgt[p*2].y.x, sgt[p*2+1].y.x);
sgt[p].x.y=max(sgt[p*2].x.y, sgt[p*2+1].x.y);
sgt[p].y.y=max(sgt[p*2].y.y, sgt[p*2+1].y.y);
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |