Submission #1049136

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10491362024-08-08 13:52:43AndreyPassport (JOI23_passport)C++14
48 / 100
323 ms229708 KiB
#include<bits/stdc++.h>
using namespace std;
vector<pair<int,int>> haha(200001);
vector<pair<int,int>> sm(1000001);
vector<pair<int,int>> big(1000001);
vector<int> seg[1000001];
vector<int> dp1(100001,1000000);
vector<int> dp2(100001,1000000);
vector<int> dp(100001,1000000);
vector<int> wow[1000001];
void build(int l, int r, int x) {
if(l == r) {
big[x] = {haha[l].second,l};
sm[x] = {haha[l].first,l};
return;
}
int mid = (l+r)/2;
build(l,mid,x*2);
build(mid+1,r,x*2+1);
big[x] = max(big[x*2],big[x*2+1]);
sm[x] = min(sm[x*2],sm[x*2+1]);
}
pair<int,int> calc(int l, int r, int ql, int qr, int x, bool yeah) {
if(ql == l && qr == r) {
if(yeah) {
return sm[x];
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...