原创 UVA 624 —— 01揹包&路徑輸出

624 - CD Time limit: 3.000 seconds   CD  You have a long drive by car ahead. You have a tape recorder, but unfort

原创 AOJ 2308 —— 計算幾何

White Bird Time Limit : 5 sec, Memory Limit : 65536 KB White Bird Angry Birds is a mobile game of a big craze

原创 UVA 10003 —— 區間DP

10003 - Cutting Sticks Time limit: 3.000 seconds   Cutting Sticks  You have to cut a wood stick into pieces. The m

原创 POJ 2311 —— 博弈Grundy值

Cutting Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2597   Accepted: 948 Description Urej lo

原创 UESTC 1307 —— 數位DP

挺不錯的一道按位DP /* ID: xinming2 PROG: stall4 LANG: C++ */ #include <cstdio> #include <cmath> #include <algorithm> #include

原创 HDOJ 1244 —— DP

Max Sum Plus Plus Plus Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submi

原创 HDOJ 1068 —— 最大獨立集

Girls and Boys Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(

原创 USACO 1.5.4 Checker Challenge ———— DFS

Checker Challenge Examine the 6x6 checkerboard below and note that the six checkers are arranged on the board so tha

原创 SGU 101

101. Domino time limit per test: 0.5 sec.  memory limit per test: 4096 KB Dominoes – game played with small, rectan

原创 USACO 1.4.2 —— 暴搜

The Clocks IOI'94 - Day 2 Consider nine clocks arranged in a 3x3 array thusly: |-------| |-------| |-------|

原创 POJ 2447 RSA —— RSA加密算法的破解過程

RSA Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 3358   Accepted: 709 Description RSA is the best-

原创 USACO 1.4.3 —— 暴搜

Arithmetic Progressions An arithmetic progression is a sequence of the form a, a+b, a+2b, ..., a+nb where n=0,1,2,3,...

原创 SGU 107 —— 打表找規律

107. 987654321 problem time limit per test: 0.25 sec.  memory> For given number N you must output amount of N-digit

原创 USACO 1.5.1 —— DP

Number Triangles Consider the number triangle shown below. Write a program that calculates the highest sum of numbers

原创 SGU 102 —— 歐拉函數

102. Coprimes time limit per test: 0.5 sec.  memory limit per test: 4096 KB For given integer N (1<=N<=104) find amou