【JZOJ A組】旅遊

Description Input Output Sample Input 6 10 4 6 4 5 3 6 5 2 3 2 1 2 3 4 6 1 2 4 1 3 Sample Output 2132 Data Constraint 思路 如果每條邊能走一次就遍歷完全圖,這個就是歐拉回路。 一個圖是歐拉回路當且僅當每個點的度數爲偶數。 我們需要計算哪幾條邊會重複走 如果一條邊兩端的點的度數爲奇數
相關文章
相關標籤/搜索