上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 46 下一页
摘要: 度熊手上有一本神奇的字典,你可以在它里面做如下三个操作: 1、insert : 往神奇字典中插入一个单词 2、delete: 在神奇字典中删除所有前缀等于给定字符串的单词 3、search: 查询是否在神奇字典中有一个字符串的前缀等于给定的字符串 Input这里仅有一组测试数据。第一行输入一个正整数 阅读全文
posted @ 2018-03-13 22:56 楼主好菜啊 阅读(293) 评论(0) 推荐(1)
摘要: lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。 Input有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。Output每组 阅读全文
posted @ 2018-03-13 17:09 楼主好菜啊 阅读(146) 评论(0) 推荐(0)
摘要: 推荐博客 : http://blog.csdn.net/u013588639/article/details/38406453 http://blog.csdn.net/king_cannon_fodder/article/details/77175620 之所以称其为字典树,是因为它在使用的过程中 阅读全文
posted @ 2018-03-13 17:03 楼主好菜啊 阅读(160) 评论(1) 推荐(1)
摘要: Alice and Bob begin their day with a quick game. They first choose a starting number X0 ≥ 3 and try to reach one million by the process described belo 阅读全文
posted @ 2018-03-12 17:31 楼主好菜啊 阅读(218) 评论(0) 推荐(0)
摘要: Alice likes snow a lot! Unfortunately, this year's winter is already over, and she can't expect to have any more of it. Bob has thus bought her a gift 阅读全文
posted @ 2018-03-12 09:19 楼主好菜啊 阅读(208) 评论(0) 推荐(0)
摘要: 推荐博客 : http://blog.csdn.net/baidu_35643793/article/details/75268911 通常我们在计算除法取模时,并不能直接的取模后再去相除,答案会有问题,在这里我们就引入逆元的,(a/b)%mod = (a*c)%mod , 在这里 c 是 b 的逆 阅读全文
posted @ 2018-03-10 22:25 楼主好菜啊 阅读(535) 评论(0) 推荐(0)
摘要: Dima is a beginner programmer. During his working process, he regularly has to repeat the following operation again and again: to remove every second 阅读全文
posted @ 2018-03-10 09:28 楼主好菜啊 阅读(243) 评论(0) 推荐(0)
摘要: 链接:https://www.nowcoder.com/acm/contest/73/B来源:牛客网 题目描述 已知f[1][1]=1,f[i][j]=a*f[i-1][j]+b*f[i-1][j-1](i>=2,1<=j<=i)。 对于其他情况f[i][j]=0 有T组询问,每次给出a,b,n,m 阅读全文
posted @ 2018-03-09 22:37 楼主好菜啊 阅读(291) 评论(0) 推荐(0)
摘要: 推荐博客 : http://blog.csdn.net/hnshhslsh/article/details/50582926 当时是看了一片讲莫对论文,还是很好懂的,就是暴力的优化,离线 + 分块就可以搞定 这类算法一般的题型是这样的,给你一组数据,让你查询某个区间中是有几个数恰好出现 K 次这样的 阅读全文
posted @ 2018-03-09 15:10 楼主好菜啊 阅读(258) 评论(0) 推荐(0)
摘要: 转自 : http://blog.csdn.net/ta201314/article/details/44205793 国家集训队论文分类 组合数学 计数与统计 2001 - 符文杰:《Pólya原理及其应用》 2003 - 许智磊:《浅谈补集转化思想在统计问题中的应用》 2007 - 周冬:《生成 阅读全文
posted @ 2018-03-08 20:35 楼主好菜啊 阅读(209) 评论(0) 推荐(0)
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 46 下一页