原创 51NOD--2537 旅行賺錢計劃--思維+優先隊列

2537 旅行賺錢計劃 2.0 秒   262,144.0 KB   20 分   3級題 nn個旅遊景點編號1…n1…n,你有一份長度爲mm的旅遊計劃t[1]…t[m]t[1]…t[m],t[i]t[i] 表示你要訪問的第 ii 景點。

原创 CF-- Road Map--思維+DFS遍歷樹

  D. Road Map time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard ou

原创 週四訓練總結

最近遇到的知識點有搜索、矩陣快速冪、棧和字符串,這幾個都要快點再做幾道題,感覺還是題量比較少,以後的CF要及時打才行,不能找藉口拖延。

原创 CF--Anniversary--斐波那契數+矩陣快速冪

C. Anniversary time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard o

原创 暑假規劃

終於結束了考試,這次考試考得真是一言難盡,各個科目概念題實在是太多了,複習的時候也沒好好看,自己比較擅長的科目也沒有了,所以說這次考得肯定很一般了。 暑假裏白天要好好看算法知識點了,不能這樣碌碌無爲,今年一定要出成績,下最大的功夫,否則就

原创 AtCoder - 2660 --Cat Snuke and a Voyage--最短路思維

Problem Statement   In Takahashi Kingdom, there is an archipelago of N islands, called Takahashi Islands. For convenien

原创 AtCoder Regular Contest 078--Splitting Pile--前綴和思想

C - Splitting Pile Time Limit: 2 sec / Memory Limit: 256 MB Score : points Problem Statement Snuke and Raccoon have a h

原创 並查集+DFS求樹上成環的點

 並查集+DFS求樹上成環的點 問題描述   小明的實驗室有N臺電腦,編號1~N。原本這N臺電腦之間有N-1條數據鏈接相連,恰好構成一個樹形網絡。在樹形網絡上,任意兩臺電腦之間有唯一的路徑相連。   不過在最近一次維護網絡時,管理員誤操

原创 AtCoder Regular Contest 059--D - アンバランス / Unbalanced(規律)

D - アンバランス / Unbalanced Time Limit: 2 sec / Memory Limit: 256 MB Score : 400400 points Problem Statement Given a string

原创 AtCoder Regular Contest 067--C - Factors of Factorial--數學思想

C - Factors of Factorial Time Limit: 2 sec / Memory Limit: 256 MB Score :  points Problem Statement You are given an in

原创 中介者模式

目錄 一、中介者模式 二、中介者模式角色 三、代碼實例一 UML圖 一、中介者模式 用一箇中介對象來封裝一系列對象的交互。中介者使得各個對象不需要顯示相互引用,從而使其耦合鬆散,而且可以獨立改變他們之間的交互。 本質就是封裝交互。 PRO

原创 POJ2137--Cowties--DP

http://poj.org/problem?id=2137 N cows (3 <= N <= 100) are eating grass in the middle of a field. So that they don't get

原创 AtCoder Regular Contest 067--D - Walk and Teleport--貪心

D - Walk and Teleport Time Limit: 2 sec / Memory Limit: 256 MB Score : points Problem Statement There are towns on a li

原创 CodeForces - 140A --New Year Table--計算幾何大圓和小圓的相容

Gerald is setting the New Year table. The table has the form of a circle; its radius equals R. Gerald invited many gues

原创 AtCoder Regular Contest 066--D - Xor Sum--DP

D - Xor Sum Time Limit: 2 sec / Memory Limit: 256 MB Score :  points Problem Statement You are given a positive integer