原创 CSUOJ 2031 Barareh on Fire

DescriptionThe Barareh village is on fire due to the attack of the virtual enemy. Several places are already on fire an

原创 CSUOJ 1040 Round-number

Description    Most of the time when rounding a given number, it is customary to round to some multiple of a power of 1

原创 CSUOJ 1973 給自己出題的小X DFS

Description小X學習了dfs,爲了練習搜索,開始給自己出題玩。 玩着玩着,一會把自己難住了,一會又被自己難倒了,真是有趣誒! 小X出的題: 現在有N個不同的正整數,求它們可以組成多少個這樣的集合,滿足:集合內的元素數量S>1集合

原创 CSUOJ 1895 Apache is late again

DescriptionApache is a student of CSU. There is a math class every Sunday morning, but he is a very hard man who learns

原创 CSUOJ 1900 鋒芒不露

Description小閃最近迷上了二刀流——不過他耍的其實是劍——新買了一個寶庫用來專門存放自己收集的雙劍。一對劍有兩把,分只能左手用的和只能右手用的,各自有一個攻擊力數值。雖然一對劍在小閃剛拿到時是一對,不過其實可以認爲它們是獨立的兩

原创 UVA 1025 A Spy in the Metro

Description Secret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. After several

原创 CSUOJ 1010 Water Drinking

Description The Happy Desert is full of sands. There is only a kind of animal called camel living on the Happy Desert.

原创 CSUOJ 1808 地鐵

Description Bobo 居住在大城市 ICPCCamp。ICPCCamp 有 n 個地鐵站,用 1,2,…,n 編號。 m 段雙向的地鐵線路連接 n 個地鐵站,其中第 i 段地鐵屬於 ci 號線,位於站 ai,bi 之間,往返均

原创 CSUOJ 1979 古怪的行列式

Description這幾天,子浩君潛心研究線性代數。 行列式的值定義如下: 其中,τ(j1j2...jn)爲排列j1j2...jn的逆序數。子浩君很厲害的,但是頭腦經常短路,所以他會按照行列式值的定義去計算,這個行列式子浩君也還是能算對

原创 CSUOJ 1560 圖書管理員的表白方式

Description小V是中南大學圖書館的圖書管理員,每天要整理很多同學們還回來的書。久而久之,他認識了很多常來圖書館的同學,比如說小L。簡而言之吧,就是小V喜歡上了小L,並且想在下一次她來還書的時候表白。小V的創意還是不錯的,他精心準

原创 CSUOJ 1270 Swap Digits

Description Now we have a number, you can swap any two adjacent digits of it, but you can not swap more than K times. T

原创 CSUOJ 1011 Counting Pixels

DescriptionDid you know that if you draw a circle that fills the screen on your 1080p high definition display, almost a

原创 CSUOJ 1781 階乘除法

Description輸入兩個正整數 n, m,輸出 n!/m!,其中階乘定義爲 n!= 1*2*3*...*n (n>=1)。 比如,若 n=6, m=3,則 n!/m!=6!/3!=720/6=120。 是不是很簡單?現在讓我們把問題

原创 CSUOJ 1868 潛在好友

Description小X在搬磚寫一個論壇,這個時候老闆突然想到一個功能,讓小X今天趕快實現。大概就是如果某個人是你好友的好友那麼他的頭像上面會有特殊的標誌。小X想不到較好的辦法來解決如何驗證兩個人是不是好友的好友,現在向你求助。 Inp

原创 CSUOJ 1008 Horcrux

DescriptionA Horcrux is an object in which a Dark wizard or witch has hidden a fragment of his or her soul for the purp