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

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

Автор MS1908, история, 5 лет назад, По-английски

I'm currently trying to solve problem AKBAR from SPOJ. My idea is to do BFS from each soldier based on strength of that soldier, and then if there is a city that is protected by 2 soldiers, or if in the end, there is a city that is not protected then the answer is No, otherwise Yes. But for some reason, my code got WA verdict. Any help on why this happened will be really appreciated.

My code: https://ideone.com/7cGTFC

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