Please subscribe to the official Codeforces channel in Telegram via the link ×

MedoN11's blog

By MedoN11, history, 8 years ago, In English

It asks for the shortest path, yet to get AC you must allow vertices on the graph to be repeated, isn't that contradicting the problem statement itself?

Consider this example :


There is no shortest path as you would have to go through 'A' twice, yet the AC solution is 3.

I've the problem accepted, but I want to avoid this confusion in future, why are non distinct vertices allowed in the shortest path in this problem?

  • Vote: I like it
  • -1
  • Vote: I do not like it

8 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

For some superstitious reason, Yogi decides to collect all the foods in order.

It seems that after you pick a letter, it dissapears, letting you pass through its location.