olahiuj的博客

想要再努力一点

bzoj4567 [Scoi2016]背单词 trie+贪心

Description Lweb 面对如山的英语单词,陷入了深深的沉思,“我怎么样才能快点学完,然后去玩三国杀呢?”。这时候睿智 的凤老师从远处飘来,他送给了 Lweb 一本计划册和一大缸泡椒,他的计划册是长这样的: ————— 序号 单词 ————— 1 2 …… n...

2018-08-15 20:02:08

阅读数:22

评论数:0

jzoj5795 词典 trie

Description Solution 我好菜啊 首先可以用T建trie,我们把每个串经过的节点插入它的序号,那么查询的时候就在trie上走然后查询最长全0即可 于是我十分sb地写了trie上的线段树合并这个在线带修改做法,十分sb地测一发极限刚好1.5s,十分sb地...

2018-08-10 19:33:07

阅读数:19

评论数:0

cf430(div.2)D Vitya and Strange Lesson 字典树

Description Today at the lesson Vitya learned a very interesting function — mex. Mex of a sequence of numbers is the minimum non-negative number t...

2018-06-01 22:12:34

阅读数:18

评论数:0

bzoj3689 异或之 字典树+堆

Description 给定n个非负整数A[1], A[2], ……, A[n]。 对于每对(i, j)满足1 <= i < j <= n,得到一个新的数A[i] xor A[j],这样共有n*(n-1)/2个新的数。求这些...

2018-05-25 23:01:34

阅读数:41

评论数:0

bzoj4896 [Thu Summer Camp2016]补退选 字典树+vector

Description X是T大的一名老师,每年他都要教授许多学生基础的C++知识。在T大,每个学生在每学期的开学前都需要选课,每 次选课一共分为三个阶段:预选,正选,补退选;其中”补退选”阶段最忙碌。在补退选阶段,学生即可以选课,也 可以退课。对于X老师来说,在补退选阶段可能发生以下两...

2018-05-16 20:33:35

阅读数:23

评论数:0

Hat's Words hdu1247 trie

DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to find all the ...

2017-05-05 19:41:55

阅读数:155

评论数:0

Phone List hdu1671 trie

Problem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the p...

2017-02-20 21:20:26

阅读数:196

评论数:0

Flying to the Mars hdu1800 trie

Problem DescriptionIn the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns ...

2017-02-20 20:34:37

阅读数:155

评论数:0

Let the Balloon Rise hdu1004 字典树

Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges’ favorite time is gues...

2017-02-20 20:02:14

阅读数:260

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭