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

By |2017-07-24T17:19:49+00:00July 24th, 2017|Categories: C/C++, Programming|Tags: , , |

#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; }