摘要:
E - Souvenir https://atcoder.jp/contests/abc286/tasks/abc286_e 思想 图计算Floyd算法,求任意两点之间的最短距离 最短距离对应路径上value总和。 Floyd算法理解 https://www.cnblogs.com/lightson 阅读全文
摘要:
D - Money in Hand https://atcoder.jp/contests/abc286/tasks/abc286_d 思路 参考:https://www.geeksforgeeks.org/coin-change-dp-7/ dp[i][j]: for j yuan, find i 阅读全文
摘要:
D - Money in Hand https://atcoder.jp/contests/abc286/tasks/abc286_d 思路 -- 可达性标记法 创建可达性标记map vis 默认设置 vis[0] = true 表示 0 的钱数,可以凑成,不用选取任何硬币 对于 A1 B1 做可访 阅读全文
摘要:
C - Rotate and Palindrome https://atcoder.jp/contests/abc286/tasks/abc286_c 思路 从原始字符串开始, rotate第一次, rotate第二次, ... , rotate最后一次 对于每种情况得到的字符串: 判断如果转换成回 阅读全文