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!
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!
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | turmax | 3559 |
| 6 | tourist | 3541 |
| 7 | strapple | 3515 |
| 8 | ksun48 | 3461 |
| 9 | dXqwq | 3436 |
| 10 | Otomachi_Una | 3413 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 153 |
| 3 | Um_nik | 146 |
| 3 | Proof_by_QED | 146 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
| Название |
|---|



Please inform me about the contest's difficulty. Is it suitable for div. 2 ?
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?
Anybody can share accepted code of D?
Yes
In the case that the negative cycle is not found on the path from 1 to N, then the answer should not be inf. For example the answer to the following case should be 1, not inf. 5 5 1 2 1 2 3 1 3 4 1 4 2 1 1 5 1