Submission #988471

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9884712024-05-24 19:17:38amirhoseinfar1385Tower (JOI24_tower)C++17
100 / 100
825 ms86820 KiB
#include<bits/stdc++.h>
using namespace std;
const long long maxn=200000+10;
long long n,q,d,a,b,allq[maxn],inf=1e12+2;
pair<long long,long long>mishe[maxn];
vector<pair<long long,long long>>all;
vector<long long>extreme;
map<long long,long long>res,lnk,res2;
vector<pair<long long,long long>>allt;
long long cal(long long w){
long long p=lower_bound(all.begin(),all.end(),make_pair(w,-1ll))-all.begin();
p--;
return res2[mishe[p].first]+(w-mishe[p].first)*a;
}
bool isi(long long w){
long long p=lower_bound(all.begin(),all.end(),make_pair(w,-1ll))-all.begin();
p--;
if(w>=mishe[p].first&&w<=mishe[p].second){
//cout<<w<<" magemishe "<<endl;
return 1;
}
return 0;
}
void vorod(){
cin>>n>>q;
cin>>d>>a>>b;
// if(a*d<b){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...