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 13 times, 1 visits today)

About the Author:

Leave A Comment