Waca loves maths,.. a lot. He always think that 1 is an unique number. After playing in hours, Waca suddenly realize that every integer can be represe ...
分类:
其他好文 时间:
2018-04-24 21:51:07
阅读次数:
189
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
1. Convert Sorted List to Binary Search Tree Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced ...
分类:
其他好文 时间:
2018-04-23 15:41:49
阅读次数:
161
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