Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
「通過する必要がある」とマークされた少なくとも1つのエッジを通過するグラフ内の最短経路を見つける必要があります。何か案は?これを達成するために、ダイクストラのアルゴリズムを変更できますか?
Cを通過する必要があるAからBへのパスについて、1つはAからCへ、もう1つはCからBへの2つの最短パスとして計算します。