# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
294406 | zoooma13 | Seats (IOI18_seats) | C++14 | 444 ms | 76544 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>
#include "seats.h"
using namespace std;
#define MAX_N 1000006
#define pii pair<int ,int>
#define mxp first
#define mip second
#define FL p<<1
#define FR p<<1|1
int n;
int h ,w ,ans;
pii tree[4*MAX_N][2];
vector <int> cor[2] ,sat;
pii mrg(pii x ,pii y){
return {max(x.mxp ,y.mxp) ,min(x.mip ,y.mip)};
}
void bld(int l=0 ,int r=n-1 ,int p=1){
if(l == r){
tree[p][0] = {cor[0][l] ,cor[0][l]};
tree[p][1] = {cor[1][l] ,cor[1][l]};
return;
}
int mid = (l+r)>>1;
bld(l ,mid ,FL);
bld(mid+1 ,r ,FR);
tree[p][0] = mrg(tree[FL][0] ,tree[FR][0]);
tree[p][1] = mrg(tree[FL][1] ,tree[FR][1]);
}
Compilation message (stderr)
# | 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... |