版本比较
题解:P9849 [ICPC 2021 Nanjing R] Xingqiu's Joke
正文
增加 2 行删除 2 行
35 行未改动3637383940404142434411 行未改动565758596060616263645 行未改动35 行未改动 ans = min(ans, dfs (lst, X) + q); ans = min(ans, dfs (nxt, X) + h); } } } } return f[hs(i, j)] = ans;}
signed main() {11 行未改动 c[cnt] = i; s[cnt] = 0; while (x % i == 0) ++ s[cnt], x /= i; ++ cnt; } } } if (x > 1) c[cnt] = x, s[cnt] = 1, ++ cnt; f.clear(); printf("%d\n", dfs (a, b - a));5 行未改动