Submission #1145677

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11456772025-02-05 04:50:43Math4Life2020Soccer Stadium (IOI23_soccer)C++20
8 / 100
280 ms192216 KiB
#include <bits/stdc++.h>
using namespace std;
using ll = long long; using pii = pair<ll,ll>;
const ll Nm = 2048; const ll E = 11; const ll INF = 1e7;
ll N;
ll ans = 0;
ll stt[Nm][2*Nm]; //y, x-segtree (coordinate of closest top point)
ll stb[Nm][2*Nm]; //same but bottom
ll nxtr[Nm][Nm];
map<ll,ll> m0[Nm+1]; //m0[top-bottom][COORDINATE COMPRESSION]->value
//COORD COMPR: (left)<<33+(right)<<22+(top)<<11+bottom
inline ll v2(ll x) {
return __builtin_ctz(x);
}
ll gtb(ll xl, ll xr, ll y0) {
if (xl>xr) {
return -1;
}
ll vl = v2(xl); ll vr = v2(xr+1);
if (vl<vr) {
return max(stb[y0][(xl>>vl)+(1<<(E-vl))],gtb(xl+(1<<vl),xr,y0));
} else {
return max(stb[y0][(xr>>vr)+(1<<(E-vr))],gtb(xl,xr-(1<<vr),y0));
}
}
ll gtt(ll xl, ll xr, ll y0) {
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...