TO ALL MY STRONG CODER FRIENDS
Guys i was recently solving
Problem ---> 2106D - Цветочный мальчик
I did solved it in O(n*m), that's brute force solution, however we are given t <= 10^4 and n <= 2 * 10 ^ 5, so we gotta solve it in O(n log(x)) or better, however i feel it very less intutive to think of binary search in this problem ._.
Can anyone please recommend me approach ?



