Hello, i have a problem with http://codeforces.com/problemset/problem/279/C to see my code here is it https://ideone.com/LNijT4 my logic as following first i got my input then i did accumulate to got the number of increases happened i think it's clear idea then according to the definition of ladders "explained in the problem" that ladder must be increasing then at point it start to decrease. what i do in each query is to find the number of increases that happened in the given range "from l to r" according to ladder definition i add number of increases "happened in range" to the begin of the range "L" i should get x such that after x the whole segment must be decreasing and before it must be increasing then if i find the number of increase before x is equal to the number of increase in the whole range it should be "Yes" else "No"
now what's wrong with this idea i am sure that it must work ?? help please ! :(