https://i2.wp.com/eblogarithm.com/wp-content/uploads/2017/07/Codeforces-Round-416-Div-2-problem-B-Vladik-and-Complicated-Book-Solution-In-CC1.png?fit=640%2C360

Codeforces Round #416 (Div. 2), problem: (B) Vladik and Complicated Book Solution In C/C++

#include<cstdio>
int p[10001],n,m,l,r,x;
int main(){
scanf(“%d%d”,&n,&m);
for(x=1;x<=n;x++)scanf(“%d”,&p[x]);
for(;m–;){
scanf(“%d%d%d”,&l,&r,&x);
for(n=l;n<=r;n++)if(p[n]<p[x])l++;
printf(“%s\n”,l==x?”Yes”:”No”);
}
return 0;
}

(Visited 3 times, 1 visits today)



There are no comments

Add yours

Leave a Reply

%d bloggers like this: