ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1227. Rally Championship

WA#17 Help, please
Posted by Ann 19 Mar 2019 00:15
An example from other discussions:

input:
4 3 12
1 2 5
1 3 4
3 4 4

output:
YES

displays the correct answer.
Tell me more examples, please.

In the algorithm, I check loops, two-way roads, cycles, and then look for a way longer than necessary.

UPD: WA#18

Edited by author 20.03.2019 19:17