CF622C Not Equal on a Segment
Description
You are given array $ a $ with $ n $ integers and $ m $ queries. The $ i $ -th query is given with three integers $ l_{i},r_{i},x_{i} $ .
For the $ i $ -th query find any position $ p_{i} $ ( $ l_{i}
Input Format
The first line contains two integers $ n,m $ ( $ 1
Output Format
Print $ m $ lines. On the $ i $ -th line print integer $ p_{i} $ — the position of any number not equal to $ x_{i} $ in segment $ [l_{i},r_{i}] $ or the value $ -1 $ if there is no such number.