原创 uva - 1347 Tour ( 動態規劃 + 遞歸 )

Tour John Doe, a skilled pilot, enjoys traveling. While on vacation, he rents a small plane and starts visiting b

原创 uva12627 Erratic Expansion (遞歸)

Erratic Expansion Piotr found a magical box in heaven. Its magic power is that if you place any red balloon inside

原创 uva 1615 Highway 高速公路 (貪心算法)

Highway Bob is a skilled engineer. He must design a highway that crosses a region with few villages. Since this r

原创 C++中 #include 雙括號和雙引號的區別

C++中 #include 雙括號和雙引號的區別 C++代碼包含頭文件時,要使用#include預處理器命令。而#include又存在兩種方式指定文件:尖括號(< >)與雙引號(" ")。 #include <header>

原创 UVa 11054 Wine trading in Gergovia (貪心)

      As you may know from the comic “Asterix and the Chieftain’s Shield”, Gergovia consists of one street,and every in

原创 基礎動態規劃題 火車站(上車下車)——遞推

問題 L: 火車站 時間限制: 1 Sec  內存限制: 128 MB提交: 13  解決: 7 [提交][狀態][討論版] 題目描述 火車從始發站(稱爲第1站)開出,在始發站上車的人數爲a,然後到達第2站,在第2站有人上、下

原创 uva 1610 Party Games (貪心+STL字符串)

   You’ve been invited to a party. The host wants to divide the guests into 2 teams for party games, withexactly the sa

原创 貪心基礎 最大整數

問題 G: 最大整數 時間限制: 1 Sec  內存限制: 128 MB提交: 67  解決: 18 [提交][狀態][討論版] 題目描述 設有n個正整數(n≤20),將它們聯接成一排,組成一個最大的多位整數。 例如:n=3時,

原创 uva 11491 Erasing and Winning 獎品的價值(貪心)

    Juliano is a fan of the TV show Erasing and Winning, where participants are selected in a draw andreceive money for

原创 UVa 208 Firetruck 消防車

    The Center City fire department collaborates with the transportation department to maintain mapsof the city which r

原创 AtCoder Beginner Contest 069 D - Grid Coloring

D - Grid Coloring Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement We have a grid w

原创 基礎分治算法題——循環比賽日程表

問題 B: 循環比賽日程表 時間限制: 1 Sec  內存限制: 128 MB提交: 1  解決: 1 [提交][狀態][討論版] 題目描述 設有N個選手進行循環比賽,其中N=2M,要求每名選手要與其他N-1名選手都賽一次,每

原创 POJ 3414 Pots 我沒有用廣搜做

Pots Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 131072/65536K (Java/Other) Total Submission(s) : 25   Accep

原创 uva 1149 Bin Packing(貪心)

A set of n 1-dimensional items have to be packed in identical bins. All bins have exactly the samelength l and each ite

原创 uva 12545 Bits Equalizer(貪心)

     You are given two non-empty strings S and T of equal lengths. S contains the characters ‘0’, ‘1’and ‘?’, whereas T