原创 【LeetCode】70. Climbing Stairs
Problem here Problem You are climbing a stair case. It takes n steps to reach to the top. Each time you can either
原创 【UVa】495 - Fibonacci Freeze
Problem here Problem The Fibonacci numbers (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, …) are defined by the recurrence:
原创 【UVa】11389 - The Bus Driver Problem
Problem here Problem In a city there are n bus drivers. Also there are n morning bus routes and n afternoon bus rou
原创 【NEFU】17-數字三角形
Problem here Problem 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 給出了一個數字三角形。從三角形的頂部到底部有很多條不同的路徑。對於每條路徑,把路徑上面的數加起來可以得到一個和
原创 【UVa】10819 - Trouble of 13-Dots
Problem here Problem Do you know 13-Dots? She is the main character of a well-known Hong Kong comic series. She is
原创 【UVa】208 - Firetruck
Problem [here](“https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&p
原创 【TopCoder】ZigZag - 2003 TCCC Semifinals 3
Problem Statement A sequence of numbers is called a zig-zag sequence if the differences between successive numbers stri
原创 【UVa】455 - Periodic Strings
Problem here A character string is said to have period k if it can be formed by concatenating one or more repetitions
原创 【SPOJ】AIBOHP - Aibohphobia
Problem here Solution 答案=原字串長度-原字串與其反轉後字串的lcm 一開始用top down寫,TLE orz…. 之後改成 bottom up 才AC #include <iostream> #inclu
原创 【POJ】Sumsets
Problem here Description Farmer John commanded his cows to search for different sets of numbers that sum to a given num
原创 【CodeForces】〖 Educational Codeforces Round 16〗A. King Moves
Problem here Problem The only king stands on the standard chess board. You are given his position in format “cd”, where
原创 【POJ】Y2K Accounting Bug
Problem here Description Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital da
原创 【UVa】11636 - Hello World!
Problem here Solution water water water water ~~~ #include <iostream> using namespace std; int main(){ int n;
原创 【POJ】Heavy Transportation
Problem here Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expa
原创 【POJ】Jungle Roads
Problem here Description The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid mon