Блог пользователя ghee_khatam

Автор ghee_khatam, история, 14 месяцев назад, По-английски

Hi everyone,

I have submitted a solution to the recent Codeforces Round 1045 Div 2 problem B (which was Add 0 or K) and my solution looks

similar to the editorial solution 2 yet my solution is giving TLE and Editorial code is getting Accepted can anyone guide me.

Link to my submission : https://codeforces.me/contest/2134/submission/335714240

update : orz qwertylkjhg pointed out the error and now it is Accepted.

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

»
14 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

You should remove 9 from x. In a test case, where k is divisible by 210 and not divisible by 9, if some a[i] is not divisible by 3, while loop will run infinitely.