上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 44 下一页
摘要: 传送门 树上带修莫队的模板。 主要是查询的时候,一开始脑子抽了想log修改log查询显然会T到死,然而O1修改根号查询就好了,直接分块维护。 注意修改每次改回去的到时候改回的是上一次修改的颜色不是它本来的颜色,WA了好久。。。 //Achen #include<algorithm> #include 阅读全文
posted @ 2018-01-17 10:53 啊宸 阅读(249) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-01-16 22:03 啊宸 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 传送门 一晚上写了一道傻逼题,这不是日常吗。 de到死亡,怀疑人生,然后重构 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<ve 阅读全文
posted @ 2018-01-13 21:46 啊宸 阅读(120) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-01-13 17:52 啊宸 阅读(11) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-01-12 18:58 啊宸 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 传送门 最小表示法模板 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<vector> #include<queue> #incl 阅读全文
posted @ 2018-01-11 20:15 啊宸 阅读(125) 评论(0) 推荐(0) 编辑
摘要: sam上维护lct,一直想做(?)一道这样的题终于在sxy的带领下做了一道最简单的模板题。 因为强制在线,又要增量的构建后缀自动机,就用lct动态维护parent树。每增加一个字符,就把它从parent树上到跟的这一段路径上的权值+1,这个可以用个懒标记维护。 然后就是后缀自动机上操作跟平时一样,只 阅读全文
posted @ 2018-01-10 21:08 啊宸 阅读(204) 评论(0) 推荐(0) 编辑
摘要: pallord-rho模板 传送门 不能srand,不能srand,不能srand 为此RE了40min //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdi 阅读全文
posted @ 2018-01-09 22:54 啊宸 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 传送门 求仙人掌的直径。 求一遍边双,建立圆方树,然后在树上dp; //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<vector> 阅读全文
posted @ 2018-01-07 22:18 啊宸 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 传送门 小半个月前的测试,现在翻出来。 考试时我和sxyA了这题。 当时随便搞了个dp,dp[i][j]表示i个数能看到j个的情况数,考虑新加入一个比之前i-1个数都小的数,能看到它的情况是它加到第一个,不能看到它的情况是它加到第1~i-1个数之后。所以 dp[i][j]=dp[i-1][j-1]* 阅读全文
posted @ 2018-01-07 22:18 啊宸 阅读(277) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 44 下一页