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

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

Автор john9, 11 лет назад, По-английски

how do we know in problem 317B - Муравьи an array of a[147][147] will suffice?? thanks in advance

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

»
11 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It isn't; I find for n=30000 I need a 111x111 array. Except if you only consider the top-right quadrant or something (in which 56x56 suffices).

To figure it out? Probably emulating it for n=30000 is the fastest way, and also note that the bounding box won't get smaller wwith larger n so you're sure n=30000 is worst case.