NEED HELP !!

Revision en1, by Jinwoo-Sung, 2025-05-25 18:09:48

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 ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Jinwoo-Sung 2025-05-25 18:09:48 425 Initial revision (published)