上一页 1 2 3 4 5 6 7 8 ··· 24 下一页
摘要: "传送门" Solution 区间DP,枚举断点,对于一个区间,枚举折叠长度,用hash暴力判断是否能折叠即可 Code cpp include include include include include define Re register define F(i,a,b) for(Re int 阅读全文
posted @ 2018-10-03 19:45 Menteur_hxy 阅读(146) 评论(0) 推荐(0) 编辑
摘要: "传送门" Solution 纯搜索80分,加二分90分,再补一个小剪枝满分qwq 真.小剪枝:如果下一个的需求和当前相同,那么不需要再次从头开始试(看代码就明白了233) Code 阅读全文
posted @ 2018-10-03 18:58 Menteur_hxy 阅读(108) 评论(0) 推荐(0) 编辑
摘要: "传送门" Solution 虽然不是点分治但用类似点分治的方法不断接近正确结果 Code cpp // luogu judger enable o2 include include include include include define F(i,a,b) for(register int i 阅读全文
posted @ 2018-10-02 23:33 Menteur_hxy 阅读(222) 评论(0) 推荐(0) 编辑
摘要: "传送门" Solution 裸区间DP Code cpp include include include include include include include define F(i,a,b) for(register int i=(a);i M; char str[]="!WING",c 阅读全文
posted @ 2018-10-02 23:29 Menteur_hxy 阅读(173) 评论(0) 推荐(0) 编辑
摘要: "传送门" Solution 根据prufer序列做的题,具体可以看 "这里" 还知道了一种避免高精除的方法quq Code 阅读全文
posted @ 2018-10-02 21:50 Menteur_hxy 阅读(134) 评论(0) 推荐(0) 编辑
摘要: "传送门" Solution 由于重量只有三种情况,那么想到用差分约束。 由于范围比较小,想到可以floyed求差分约束,暴力求天平另一边 Code cpp include include include include include define F(i,a,b) for(register in 阅读全文
posted @ 2018-10-02 20:36 Menteur_hxy 阅读(183) 评论(0) 推荐(0) 编辑
摘要: "传送门" Solution 复习下tire( ̄▽ ̄)/ 裸的可持久化tire,我用树剖求了下LCA Code cpp include include include include include define F(i,a,b) for(register int i=(a);ilen) retur 阅读全文
posted @ 2018-10-02 19:51 Menteur_hxy 阅读(235) 评论(0) 推荐(0) 编辑
摘要: "传送门" 吐槽洛谷难度标签qwq Solution 显然是一道神奇的DP,由于总钱数不变,我们只需要枚举前两个人的钱数就可知第三个人的钱数 DP的时候先枚举只用前k个币种,然后枚举前两个人的钱数,然后枚举转移即可 Code cpp include include include include i 阅读全文
posted @ 2018-10-02 16:43 Menteur_hxy 阅读(299) 评论(0) 推荐(0) 编辑
摘要: "传送门" Solution 可以发现实际上是把n分为几个循环节,然后找循环节的$lcm$是这次的排数 而$lcm$必然是一些最高次幂的质数的成积,那么就dp求一下所有情况就好了 PS:注意并不是必须要等于n小于n都行,因为可以在后面补1而$lcm$不变 Code cpp include inclu 阅读全文
posted @ 2018-10-02 16:38 Menteur_hxy 阅读(238) 评论(0) 推荐(0) 编辑
摘要: "传送门" Solution 强行猜测公式形如$f_i=k\times f_{i 1}+b$,暴力求$f_1,f_2,f_3$,剩下的递推就行 Code 阅读全文
posted @ 2018-09-30 19:59 Menteur_hxy 阅读(197) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 24 下一页