m_nigam01's blog

By m_nigam01, history, 3 months ago, In English

Hello, Codeforces!

I am solving this problem https://codeforces.com/contest/1665/problem/B

But I'm getting TLE on test case 13. I don't think there should be any TLE. Please look at my code and guide me what's wrong with my thought process. https://pastebin.com/EmhQpghv

I also optimized my code to get rid of inner while loop https://pastebin.com/5800fc8C But still get TLE on testcase 13.

Thanks for any help or suggestion!

Read more »

  • Vote: I like it
  • 0
  • Vote: I do not like it