原创 【CodeForces - 821D Okabe and City】 最短路spfa

E - Okabe and City   Okabe likes to be able to walk through his city on a path lit by street lamps. That way, he

原创 【POJ - 2955 Brackets】 區間DP

L - Brackets We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a re

原创 【CodeForces - 821C Okabe and Boxes】 思維+模擬

D - Okabe and Boxes Okabe and Super Hacker Daru are stacking and removing boxes. There are n boxes numbered from 1 to

原创 【FZU - 2283 Tic-Tac-Toe】 模擬

L - Tic-Tac-Toe Kim likes to play Tic-Tac-Toe. Given a current state, and now Kim is going to take his next move. Pl

原创 【CodeForces - 777E Hanoi Factory】 貪心+棧

E - Hanoi Factory Of course you have heard the famous task about Hanoi Towers, but did you know that there is a speci

原创 【CodeForces - 798C Mike and gcd problem】 思維+貪心

E - Mike and gcd problem   Mike has a sequence A = [a1, a2, ..., an] of length n. He considers the sequence B = 

原创 【POJ - 2230 Watchcow】 歐拉回路

G - Watchcow Bessie's been appointed the new watch-cow for the farm. Every night, it's her job to walk across the farm

原创 【CodeForces - 758C Unfair Poll】 暴力 + 模擬

D - Unfair Poll On the Literature lesson Sergei noticed an awful injustice, it seems that some students are asked mor

原创 【SCU - 3596 Article Decryption】 字典樹 + DP

I - Article Decryption Time Limit:1000ms Memory Limit:65536KB Description You are given an dictionary in wh

原创 【HDU - 5573 Binary Tree】 構造

F - Binary Tree The Old Frog King lives on the root of an infinite tree. According to the law, each node should conne

原创 【HDU - 1811 Rank of Tetris】 並查集+拓撲排序

B - Rank of Tetris 自從Lele開發了Rating系統,他的Tetris事業更是如虎添翼,不久他遍把這個遊戲推向了全球。 爲了更好的符合那些愛好者的喜好,Lele又想了一個新點子:他將製作一個全球Tetris高手排行榜

原创 POJ題目分類

借鑑學習 轉載鏈接:http://www.cnblogs.com/kuangbin/archive/2011/07/29/2120667.html 初期: 一.基本算法:      (1)枚舉. (poj1753,poj2965

原创 【CodeForces - 808B Average Sleep Time】 思維

D - Average Sleep Time   It's been almost a week since Polycarp couldn't get rid of insomnia. And as you may alre

原创 【HDU - 1059 Dividing】 混合揹包

I - Dividing Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that

原创 【Gym - 100482B Farmer 】 思維

B - Farmer John is a successful farmer and he would like to expand his business. For this reason he is going to buy a