原创 2014年天勤計算機考研複試上機練習賽(2):世界盃來了

題目描述 2014年是世界盃年,小明作爲一個資深球迷必然不會錯過這場足球界的饕餮盛宴。但是由於比賽太多,而且並不是任何時間小明都能夠看球賽,所以小明把他重點關注的那些球賽的轉播時間表給你,希望你能夠幫他合理安排一下,讓他能夠儘

原创 2014名校複試機考模擬題 21376:朋友圈

題目鏈接:http://zju.acmclub.com/index.php?app=problem_title&id=1&problem_id=21376  ACM破50啦!!目標150!! 題目描述 小明所在的學校有N個學生

原创 上海交大2009 日期差值

題目描述: 有兩個日期,求兩個日期之間的天數,如果兩個日期是連續的我們規定他們之間的天數爲兩天 輸入: 有多組數據,每組數據有兩行,分別表示兩個日期,形式爲YYYYMMDD 輸出: 每組數據輸出一行,即日期差值 樣例輸入: 201

原创 2014名校複試機考模擬題 21375:小明的約會

題目鏈接:http://zju.acmclub.com/index.php?app=problem_title&id=1&problem_id=21375 題目描述 小明和他的女朋友是兩朵奇葩,總是願意把簡單問題搞得很複雜,這不小

原创 九度1449:確定比賽名次(拓撲排序)

題目描述: 有N個比賽隊(1<=N<=500),編號依次爲1,2,3,。。。。,N進行比賽,比賽結束後,裁判委員會要將所有參賽隊伍從前往後依次排名,但現在裁判委員會不能直接獲得每個隊的比賽成績,只知道每場比賽的結果,即P1贏P2,用P

原创 PAT(Basic Level) 1022 D進制的A+B (20)

輸入兩個非負10進制整數A和B(<=230-1),輸出A+B的D (1 < D <= 10)進制數。 輸入格式: 輸入在一行中依次給出3個整數A、B和D。 輸出格式: 輸出A+B的D進制數。 輸入樣例: 123 456 8 輸

原创 九度1448:Legal or Not

題目描述: ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big

原创 POJ 3255 Roadblocks

Description Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does

原创 2014名校複試機考模擬題 21373:最愛迴文串

題目鏈接:http://zju.acmclub.com/index.php?app=problem_title&id=1&problem_id=21373 題目描述 土豪大學的高富帥實驗室裏有一個迴文帝,名叫小明。小明每次看到一個

原创 POJ 1502 MPI Maelstrom

Description BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed sha

原创 POJ 1258 Agri-Net

Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connec

原创 PAT 1030 Travel Plan (30)

A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now yo

原创 PAT 1023. 組個最小數 (20)

給定數字0-9各若干個。你可以以任意順序排列這些數字,但必須全部使用。目標是使得最後得到的數儘可能小(注意0不能做首位)。例如:給定兩個0,兩個1,三個5,一個8,我們得到的最小的數就是10015558。 現給定數字,請編寫程序輸出

原创 POJ 1789 Truck History

Description Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery

原创 POJ 2524 Ubiquitous Religions(並查集)

Description There are so many different religions in the world today that it is difficult to keep track of them all.