在 G=(V, E)中尋找任兩Vertex的最短距離 (其中E可以有負權)
Keywords: 模反元素、費馬小定理、輾轉相除法
Keyword: ceil, floor, round
連續兩周遇到除法並向上取整的題目,取整是很常見的做法,一般程式語言的整數除法中,「對非負數而言,都是向下取整」。
注意C++不論是除法或是mod,都是向零的方向運作。所以本篇的運算,基本上都只能在非負整數上工作。
keywords: deadlock
Keywords: Inode, hard links, soft links
求解含負權邊的「單源最短路徑」問題的演算法
keywords: Andrew’s Monotone Chain, convex hull, cross product
These were the top 10 stories published by learning note; you can also dive into yearly archives: 2020, 2021.