原创 UVa Problem Solution: 10138 - CDVII
Sort the the photo records according to license number, then time. If a license has no cost, do not output it.Code:/***
原创 UVa Problem Solution: 10077 - The Stern-Brocot Number System
Just like find a number in a binary search tree. The only trick is keeping record of the current node's left and right
原创 UVa Problem Solution: 10198 - Counting
Let f(n) denote the number of ways to make the sum of n. When n > 3, the number of digits is greater than 1. The first
原创 UVa Problem Solution: 10157 - Expressions
Let n denotes the length of the expression, d denotes the depth at most, and the count is f(n,d). Obviously, f(n,d) = 0
原创 UVa Problem Solution: 10183 - How many fibs?
The close form of fibs does not help in the problem. The input range is too large that the precision of long double won
原创 UVa Problem Solution: 10104 - Euclid Problem
For the detail explanation of the algorithm, refer to Programming Challenges.Code:/************************************
原创 UVa Problem Solution: 10049 - Self-describing Sequence
Let g(n) denote the n'th number that satifies f(k) > f(k-1). We can know that g(0) = 1, g(1) = 2, g(2) = 4, ... Fro
原创 I Love Big Numbers!
My big integer class is finally finished. I have not tested it extensively yet. Anybody who is willing to find a tiny a
原创 UVa Problem Category (Programming Challenges)
General 100 - The 3n+1 problem | Solution 10189 - Minesweeper | Solution 10137 - The Trip | Solution 706 - LC-Display |
原创 iPhone4離線地圖製作
最近自己製作了幾個iphone4使用的離線地圖,總結一下經驗: 1. 原始地圖下載 使用Global Map Download Tool 下載,網上教程很多。 2. 轉爲iPhone格式 使用GMDL的‘->iPho
原创 UVa Problem Solution: 10089 - Repackaging
First, convert each package p = (s1, s2, s3) to a vector (s2 - s1, s3 - s1). All the packages forms convex hull. If p
原创 Rubik's Cube Beijing Spring Open 2009
Beijing Spring Open 2009 was held on Feb. 21st, 2009. I played in the game and passed the first round with a rank of
原创 UVa Problem Solution: 10042 - Smith Numbers
Follow the problem's statements and you'll get it.Code:/***************************************************************
原创 UVa Problem Solution: 10139 - Factovisors
We check each of the prime factors of m to see if n! has enough prime factors of the same value. If so, m can divide n!
原创 UVa Problem Solution: 10110 - Light, More Light
The final state of the last bulb is determined by the number of factors of n. Only the number which is