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

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

AtCoder Beginner Contest 061 will be held.

Time: May 13th (Saturday), 21:00 JST

Duration: 100 minutes

Number of Tasks: 4

writer: Hec

Rating: 0-1199

The point values are: 100 — 200 — 300 — 400

We are looking forward to your participation!

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

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

Please inform me about the contest's difficulty. Is it suitable for div. 2 ?

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

How to solve D ?

My idea was to make all the weights negative, and then apply Bellman Ford. If there was any negative cycle the answer would be "inf", else "-1 * dist[N]".

However, i got WA on the last 3 cases. Any help where am i wrong?