# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
144308 | Lyestria | Rectangles (IOI19_rect) | C++14 | 0 ms | 0 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 "rect.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int short
const int mn=2510;
struct seg{
int seg[mn][12];
inline void up(int a,int b){
seg[a][0]=b;
}
inline void init(){
for(int i=1;i<12;i++){
for(int j=0;j+(1<<i-1)<mn;j++){
seg[j][i]=min(seg[j][i-1],seg[j+(1<<i-1)][i-1]);
}
}
}
inline int qu(int a,int b){
int ret=0x3f3f3f3f;
for(int i=11;i>=0;i--){
if(a+(1<<i)<=b+1)ret=min(ret,seg[a][i]),a+=(1<<i);
}
return ret;
}
};
seg lef[mn],rig[mn],up[mn],dow[mn];
int elef[mn][mn],erig[mn][mn],eup[mn][mn],edow[mn][mn];
multiset<ll>ss;
long long hsh(ll a,ll b,ll c,ll d){