精華區beta Marginalman 關於我們 聯絡資訊
三天不刷提 便絕面目可蹭 不過我原本就長的ˊ醜 沒差 def findChampion(self, n: int, edges: List[List[int]]) -> int: indeg = [0 for _ in range(n)] for e in edges: indeg[e[1]] += 1 ans = [] for i, deg in enumerate(indeg): if deg == 0: ans.append(i) return ans[0] if len(ans)==1 else -1 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.229.37.69 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1732633257.A.1AD.html
sustainer123: 我最近都在刷dp 越刷越不懂dp 藥丸 11/26 23:05
TokiwaKurumi: 你是帥潮 11/27 00:19