摘要: 首先总结一下前段时间遇到过的一些有意思的题。 Round #474 (Div. 1 + Div. 2, combined) Problem G 其实关键就是n这个数在排列中的位置。 这样对于一个排列,设$f[pos] = p$, 那么从位置$1$到位置$pos$最大值被刷新了$a$次,从位置$n$到阅读全文
posted @ 2018-05-19 22:14 cxhscst2 阅读(73) 评论(0) 编辑
摘要: Problem A Problem B Problem C Problem D Problem E Problem F Problem G Problem H Problem I Problem J Problem K Problem L阅读全文
posted @ 2018-08-11 09:20 cxhscst2 阅读(4) 评论(0) 编辑
摘要: Problem A Problem B Problem C Problem D Problem E Problem F Problem G Problem H Problem I Problem J Problem K Problem L阅读全文
posted @ 2018-08-11 09:19 cxhscst2 阅读(5) 评论(0) 编辑
摘要: Problem A Problem B Problem C Problem D Problem E Problem F Problem G Problem H Problem I Problem J Problem K Problem L阅读全文
posted @ 2018-08-11 09:19 cxhscst2 阅读(3) 评论(0) 编辑
摘要: Problem A Problem B Problem C Problem D Problem E Problem F Problem G Problem H Problem I Problem J Problem K Problem L阅读全文
posted @ 2018-08-11 09:17 cxhscst2 阅读(7) 评论(0) 编辑
摘要: Problem A Problem B Problem C Problem D Problem E Problem F Problem G Problem H Problem I Problem J阅读全文
posted @ 2018-08-03 17:05 cxhscst2 阅读(10) 评论(0) 编辑
摘要: Problem A Problem B Problem C Problem D Problem E Problem F Problem G Problem H Problem I Problem J Problem K Problem L阅读全文
posted @ 2018-08-03 17:04 cxhscst2 阅读(13) 评论(0) 编辑
摘要: Problem A Problem B Problem C Problem D Problem E Problem F Problem G Problem H Problem I Problem J Problem K Problem L Problem M阅读全文
posted @ 2018-08-03 17:03 cxhscst2 阅读(17) 评论(0) 编辑
摘要: Problem A 考虑用欧拉公式降幂 (因为这个模数是质数所以方便很多,不用考虑那些乱七八糟的情况) Problem B Problem C Problem D Problem E Problem F Problem G Problem H Problem I Problem J Problem 阅读全文
posted @ 2018-07-29 14:59 cxhscst2 阅读(23) 评论(0) 编辑
摘要: Problem A DP,输出路径的时候减下去就可以了。 Problem B 如果一个点度数 $<= 2$,那么这个点肯定会被删掉。 考虑每个度数 $>= 3$的点为根并且不选这个根的情形,假设这个点有$sz$个儿子。 如果我在$sz$个分支里面只有 $<= 2$个分支里面的点被选择了。 那么首先其阅读全文
posted @ 2018-07-29 14:58 cxhscst2 阅读(19) 评论(0) 编辑
摘要: Problem A Problem B 考虑第二种优惠,每一个物品如果原价购买了, 那么向可以免费拿的那个物品连一条边(在树上被指向的那个点是父亲) 如果不考虑环的话,考虑树上DP。 设$f[i][0]$表示买掉以$i$为根的子树需要的最小花费, 设$f[i][0]$表示买掉以$i$为根的子树并且$阅读全文
posted @ 2018-07-29 14:55 cxhscst2 阅读(16) 评论(0) 编辑