原创 單例設計模式
目錄 餓漢式單例模式 懶漢式單例模式 雙重檢查鎖單例模式 靜態內部類方式單例模式 枚舉式單例模式 如何解決反射和反序列化漏洞 效率分析 餓漢式單例模式 package singleton; /** * 測試餓漢式單例模式
原创 字典樹--What Are You Talking About
What Are You Talking About Ignatius is so lucky that he met a Martian yesterday. But he didn't know the language the Ma
原创 最小生成樹--Building a Space Station
Building a Space Station You are a member of the space station engineering team, and are assigned a task in the constru
原创 字典樹--Hat’s Words
Hat’s Words A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dict
原创 手寫服務器httpserver項目
目錄 Package Explorer目錄 server包 CloseUtil.java Dispatcher.java Entity.java Mapping.java Request.java Response.java S
原创 二分匹配--Air Raid
Air Raid Consider a town where all the streets are one-way and each street leads from one intersection to another. It i
原创 母函數--Ignatius and the Princess III
Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total
原创 揹包--飯卡
飯卡 電子科大本部食堂的飯卡有一種很詭異的設計,即在購買之前判斷餘額。如果購買一個商品之前,卡上的剩餘金額大於或等於5元,就一定可以購買成功(即使購買後卡上餘額爲負),否則無法購買(即使金額足夠)。所以大家都希望儘量使卡上的餘額最少。
原创 思維拓展--Ancient Messages
Ancient Messages Problem Description In order to understand early civilizations, archaeologists often study texts writt
原创 AC自動機--Keywords Search
Keywords Search In the modern time, Search engine came into the life of everybody like Google, Baidu, etc. Wiskey also
原创 二分匹配--Machine Schedule
Machine Schedule As we all know, machine scheduling is a very classical problem in computer science and has been studie
原创 線段樹--I Hate It
I Hate It 很多學校流行一種比較的習慣。老師們很喜歡詢問,從某某到某某當中,分數最高的是多少。 這讓很多學生很反感。 不管你喜不喜歡,現在需要你做的是,就是按照老師的要求,寫一個程序,模擬老師的詢問。當然,老師有時候需要更新某位同
原创 二分匹配--棋盤遊戲
棋盤遊戲 小希和Gardon在玩一個遊戲:對一個N*M的棋盤,在格子裏放盡量多的一些國際象棋裏面的“車”,並且使得他們不能互相攻擊,這當然很簡單,但是Gardon限制了只有某些格子纔可以放,小希還是很輕鬆的解決了這個問題(見下圖)注意不能
原创 次小生成樹--Qin Shi Huang's National Road System
Qin Shi Huang's National Road System During the Warring States Period of ancient China(476 BC to 221 BC), there were
原创 二分匹配--過山車
過山車 RPG girls今天和大家一起去遊樂場玩,終於可以坐上夢寐以求的過山車了。可是,過山車的每一排只有兩個座位,而且還有條不成文的規矩,就是每個女生必須找個個男生做partner和她同坐。但是,每個女孩都有各自的想法,舉個例子把,R