Submission #1133532

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11335322025-01-08 06:15:54MuhammetSegments (IZhO18_segments)C++17
0 / 100
163 ms131072 KiB
#include "bits/stdc++.h"
using namespace std;
#define SZ(s) (int)s.size()
#define ff first
#define ss second
vector <int> st, stm;
vector <vector <int>> vc[2][2];
vector <pair<int,int>> v[2];
vector <pair<int,pair<int,int>>> s[2];
int bld(int nd, int l, int r, int t){
if(l == r){
st[nd] = s[t][l].ff;
stm[nd] = s[t][l].ff;
vc[t][0][nd].push_back(s[t][l].ss.ff);
vc[t][1][nd].push_back(s[t][l].ss.ss);
return st[nd];
}
int md = (l + r) / 2;
st[nd] = min(bld(nd*2,l,md,t), bld(nd*2+1,md+1,r,t));
stm[nd] = max(stm[nd*2], stm[nd*2+1]);
vector <int> v1 = vc[t][0][nd*2], v2 = vc[t][0][nd*2+1];
reverse(v1.begin(), v1.end()), reverse(v2.begin(), v2.end());
while(SZ(v1) or SZ(v2)){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...