Ada the Ladybug lives near an orange tree. Instead of reading books, she investigates the oranges. The oranges on orange tree can be in up to 5*50 Sha ...
分类:
其他好文 时间:
2018-04-23 19:52:26
阅读次数:
167
Problem description. The Fibonacci numbers defined as f(n) = f(n-1) + f(n-2) where f0 = 0 and f1 = 1. We define a function as follows D(n,x) = x + x^2 ...
分类:
其他好文 时间:
2018-04-20 23:46:38
阅读次数:
193
You are given an array of size N. How many distinct arrays can you generate by swapping two numbers for exactly once? The two selected numbers can be ...
分类:
其他好文 时间:
2018-04-20 22:13:40
阅读次数:
211
A positive integer is called a palindrome if its representation in the decimal system is the same when read from left to right and from right to left. ...
分类:
其他好文 时间:
2018-04-19 19:13:50
阅读次数:
179
ANDROUND - AND Rounds #tree #tree You are given a cyclic array A having N numbers. In an AND round, each element of the array A is replaced by the bit ...
分类:
其他好文 时间:
2018-04-14 23:53:01
阅读次数:
211
倍增算法(da) DC3 http://www.spoj.com/problems/DISUBSTR/ spoj 694 求不同子串的个数 到今天才是1/8的男人 http://poj.org/problem?id=1743(楼教主的男人八题之一) 求不重叠的最长公共串 uva11107 输入n个D ...
分类:
编程语言 时间:
2018-04-14 15:20:52
阅读次数:
196
【SPOJ】Power Modulo Inverted(拓展BSGS) 题面 "洛谷" 求最小的$y$ 满足 $$k\equiv x^y(mod\ z)$$ 题解 拓展$BSGS$模板题 cpp include include include include include include incl ...
分类:
其他好文 时间:
2018-04-12 22:30:18
阅读次数:
177
COINS - Bytelandian gold coins #dynamic-programming #dynamic-programming In Byteland they have a very strange monetary system. Each Bytelandian gold c ...
分类:
其他好文 时间:
2018-04-11 19:13:27
阅读次数:
157
https://www.luogu.org/problemnew/show/SP8222#sub http://www.spoj.com/problems/NSUBSTR/ 翻译来自洛谷。 你得到一个字符串,最多由25万个小写拉丁字母组成。我们将 F(x)定义为某些长度X的字符串在s中出现的最大次数 ...
分类:
其他好文 时间:
2018-04-10 10:47:19
阅读次数:
183
【SPOJ】QTREE7(Link Cut Tree) 题面 "洛谷" "Vjudge" 题解 和 "QTREE6" 的本质是一样的:维护同色联通块 那么,QTREE6同理,对于两种颜色分别维护一棵$LCT$ 每次只修改和它父亲的连边。 考虑如何维护最大值 因为每次$access$会删去一个数,所以 ...
分类:
其他好文 时间:
2018-04-09 18:51:40
阅读次数:
197