Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Strange bug in 877D — Olya and Energy Drinks
Разница между en2 и en3, 4 символ(ов) изменены
Here is the problem's link :↵
http://codeforces.net/contest/877/problem/D↵


In this problem I used BFS to solve it. In my WA submission I choose to break when the distance from the origin of the cell I am traversing is smaller or equal to the distance of the point of the front of the queue plus 1. In my accepted solution I choose to break when the distance from the origin of the cell I am traversing is smaller or equal to the distance of the point of the front of the queue. But I can't understand why my first solution fail. Can anyone give me the explanation ?↵


Correct : http://codeforces.net/contest/877/submission/31687084↵
WA: http://codeforces.net/contest/877/submission/31686998

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский coding_weeb 2017-10-26 20:03:23 4 Tiny change: 'nation ?\nCorrect ' -> 'nation ?\n\n\nCorrect '
en2 Английский coding_weeb 2017-10-26 17:29:21 7
en1 Английский coding_weeb 2017-10-26 17:28:21 732 Initial revision (published)