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 1930. Ivan's Car

Hint
Posted by ... 1 Dec 2016 15:08
0-1 bfs on graph with 2 * n verticles.
Re: Hint
Posted by ComebackSeason 12 Jul 2017 17:22
Used this idea, but instead I used another adj. list to store directions
cin >> u >> v
graph[u].push_back(v);
direction[u].push_back(0);

graph[v].push_back(u);
direction[v].push_back(1);

0.046s AC

Edited by author 12.07.2017 17:23