字典树
black_miracle
这个作者很懒,什么都没留下…
展开
-
HDU 3460 字典树
Ancient Printer Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Problem Description The contest is beginning! While preparing the contest, iSea wanted原创 2016-07-31 23:32:27 · 231 阅读 · 0 评论 -
Codeforces 706d 字典树+贪心
Vasiliy's Multiset time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Author has gone out of the stories about原创 2016-08-13 23:36:26 · 401 阅读 · 0 评论 -
codeforces 1084E
传送门:http://codeforces.com/contest/1084/problem/E 题意:给出两个字符串s,t,选出k个字符串,使得字典序在[s,t]内且前缀和不同的数量最多。 题解:题目是询问构建一颗字典树,最左边不小于s,最右边不大于t,且结点个数最多,那么我们只要左边贴着s走,右边贴着t走即可,也就是如果当前左边不能走a右边不能走b的情况,我们要减掉相应的方案数。 #i...原创 2019-01-18 11:27:01 · 181 阅读 · 0 评论