Stay Hungry,Stay Foolish!

摘要: 1055. Combinations https://acm.timus.ru/problem.aspx?space=1&num=1055 思路 对于组合数 C(M,N) 不能使用公式计算最终值,然后再根据最终值,分解质因数,统计质因数个数; 因为这种情况会导致数值越界。 改变思路, 组合数公式实际 阅读全文
posted @ 2023-01-03 15:34 lightsong 阅读(14) 评论(0) 推荐(0) 编辑
摘要: F - Permutation Distance https://atcoder.jp/contests/abc283/tasks/abc283_f 思路 最小生成树法: https://zhuanlan.zhihu.com/p/595421879 动态缩减查找距离法 朴素思维: 如果按照Di定义, 阅读全文
posted @ 2023-01-03 12:20 lightsong 阅读(38) 评论(0) 推荐(0) 编辑
Life Is Short, We Need Ship To Travel