精華區beta Marginalman 關於我們 聯絡資訊
1791. Find Center of Star Graph There is an undirected star graph consisting of n nodes labeled from 1 to n. A star graph is a graph where there is one center node and exactly n - 1 edges that connect the center node with every other node. 原本想說這題很簡單啊 所有node算一下誰的edge最多 然後時間跟別人比慢的要死 一看答案 靠北 直接取兩個edge 共通的node就好了 泥板只剩我不看答案連easy都不會了 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 73.173.211.221 (美國) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1719447468.A.490.html
Rushia: 笑死 我也在想怎麼那麼慢 06/27 13:50