摘要: 题目链接:https://www.luogu.org/problemnew/show/UVA11806 容斥原理+组合数 正着找合♂fa的不好找,那就用总方案数 不合♂fa的 include include include include using namespace std; const int 阅读全文
posted @ 2018-10-14 21:48 Misaka_Azusa 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.luogu.org/problemnew/show/P1666 10.13考试题 当时没想出来,觉得是要用trie做,在trie上跑一个树形dp 结果是写了个子集枚举还炸了 后来这道题可以暴力+string类型解 还是string用的少啊 include inclu 阅读全文
posted @ 2018-10-14 18:21 Misaka_Azusa 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.luogu.org/problemnew/show/P2491 题外话: OI一共只有三种题——会的题,不会的题,二分题。 题解: step 1 求树的直径,把树的直径上的路径边权都置为0,这样了再求一次其他点最短路。 step 2 在树的直径上二分,具体方法是把树 阅读全文
posted @ 2018-10-14 16:48 Misaka_Azusa 阅读(212) 评论(0) 推荐(0) 编辑
Live2D