Greedy algorithm -- 短視/近利/偷懶/貪婪的想法: 每一步都不管大局, 只求這一步換掉越多1 元硬幣越好。 x0 = floor(n / 50); n = n % 50;; x1 = floor(n / 10); n = n % ...
確定! 回上一頁