What is wrong with logic, getting WA for some inputs

Revision en1, by m_nigam01, 2023-12-01 16:24:05

Hello all,

I have tried to solve the question using given k values. So if current k doesn't satisfy the condition i look to the left and to the right and whichever side gives me smallest one i consider that side and discard the other half.

c++ code https://codeforces.com/contest/1805/submission/235224707

python code https://codeforces.com/contest/1805/submission/235213482

Thank you.


  Rev. Lang. By When Δ Comment
en1 English m_nigam01 2023-12-01 16:24:05 452 Initial revision (published)