原创 01揹包的c語言實現

        01揹包算是動態規劃的入門項目了,網上的解釋也是各種爛大街。題目基本是下面這種格式的:         01揹包是在M件物品取出若干件放在空間爲W的揹包裏,每件物品的體積爲W1,W2……Wn,與之相對應的價值爲P1,P2

原创 POJ 2002 Square

Description A square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is

原创 zoj 3019 Puzzle

給你兩串數A,B,讓你隨意排列這些數使它們的最長公共子序列最長。 開始還以爲是DP,後來覺得,這個真沒必要呀。 因爲可以按任何安排,那麼只要知道這兩個序列中有多少個數是相同的就OK了,那一定是最長的。 直接排序,兩個都排序,然後按順序查

原创 SPOJ 1026 Favorite Dice

Description BuggyD loves to carry his favorite die around. Perhaps you wonder why it's his favorite? Well, his die i

原创 Java之OOP基礎

       以前一直想一探Java的究竟來着,但總是因爲自己的懶惰半途而廢。這次也算是因禍得福,總算有了一點時間可以去搞一搞自己喜歡的東西了。        一切從零開始,先看看OOP最核心的概念——對象與類。        首先,有幾

原创 SPOJ QUEST5 Nail Them

Description To get to the treasure, Jones must complete one more task. He comes across a table, where there are a nu

原创 SPOJ 5295 Adjacent Bit Counts

Description For a string of n bits x1,x2,x3,...,Xn the adjacent bit count of the string (AdjBC(x)) is given by X1*X

原创 POJ 1151 Atlantis

首先,我得吐個槽。陶叔果然是個誠實的孩子,今天的題簡直坑爆了好麼? 先說A題,翻了一遍題目,覺得A題(SPOJ SUB_PROB)就是個KMP的模板題,心中大喜,套模板,欲A之,怎奈何居然是WA(我還提交了三遍T_T,再不濟你給個TLE我

原创 OSUNT(Open Source Intelligence)以及踩點技術介紹

       以下內容參考《高度安全環境下的高級滲透測試》        OSUNT是開源情報的意思,我們所使用的這些資源都可以免費公開的獲取。        開源情報包括收集、處理和分析公開的數據,將這些數據轉化成可操作可利用的文檔。

原创 Codeforces 81A Plug-in

Description Polycarp thinks about the meaning of life very often. He does this constantly, even when typing in the e

原创 AIZU 0024 Physical Experiments

Description Ignoring the air resistance, velocity of a freely falling object v after t seconds and its drop y in t

原创 註冊表Explore的一些選項

我們知道在註冊表的“HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Poli

原创 SPOJ 1881 Instruction Decoder

Description Mathews uses a brand new 16-bit instruction processor. (Yeah i am being sarcastic!). It has one register (

原创 UVa 1329 Corporative Network

DescriptionA very big corporation is developing its corporative network. In the beginning each of the N enterprises of

原创 SPOJ 18937 Touch of Venom

Description Sometimes you have to try fighting even though you know that your enemy is very powerful than you. Your