原创 下沙小面的(2)

前文再續,書接上一題。話說當上小面的司機的Lele在施行他的那一套拉客法則以後,由於走的路線太長,油費又貴,不久便虧本了。(真可憐~)於是他又想了一個拉客的辦法。 對於每一次拉客活動,他一次性把乘客都拉上車(當然也不會超過7個,因爲位置

原创 敵兵佈陣

C國的死對頭A國這段時間正在進行軍事演習,所以C國間諜頭子Derek和他手下Tidy又開始忙乎了。A國在海岸線沿直線佈置了N個工兵營地,Derek和Tidy的任務就是要監視這些工兵營地的活動情況。由於採取了某種先進的監測手段,所以每個工

原创 Play on Words

Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open th

原创 Oil Deposits

The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with

原创 Anagrams by Stack

How can anagrams result from sequences of stack operations? There are two sequences of stack operators which can conve

原创 Red and Black

There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on

原创 Run Away

One of the traps we will encounter in the Pyramid is located in the Large Room. A lot of small holes are drilled into

原创 Stars

Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coord

原创 湫湫系列故事——減肥記II

雖然制定了減肥食譜,但是湫湫顯然剋制不住吃貨的本能,根本沒有按照食譜行動! 於是,結果顯而易見…   但是沒有什麼能難倒高智商美女湫湫的,她決定另尋對策——吃沒關係,咱吃進去再運動運動消耗掉不就好了?   湫湫在內心咆哮:“我真是天才啊

原创 最短路

在每年的校賽裏,所有進入決賽的同學都會獲得一件很漂亮的t-shirt。但是每當我們的工作人員把上百件的衣服從商店運回到賽場的時候,卻是非常累的!所以現在他們想要尋找最短的從商店到賽場的路線,你可以幫助他們嗎?   Input 輸入

原创 A計劃

可憐的公主在一次次被魔王擄走一次次被騎士們救回來之後,而今,不幸的她再一次面臨生命的考驗。魔王已經發出消息說將在T時刻吃掉公主,因爲他聽信謠言說吃公主的肉也能長生不老。年邁的國王正是心急如焚,告招天下勇士來拯救公主。不過公主早已習以爲常

原创 What Are You Talking About

Ignatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gi

原创 鄭廠長系列故事——體檢

鄭廠長不是正廠長   也不是副廠長   他根本就不是廠長   只是公司的一個碼農      鄭廠長所在的騰訊公司每一年都要組織員工體檢,比如量身高體重、測血壓之類的,今年也不例外。   這次總共有N位員工接受體檢,並且每個員工都需要做K

原创 hdoj 湫湫系列故事——減肥記I

對於吃貨來說,過年最幸福的事就是吃了,沒有之一!   但是對於女生來說,卡路里(熱量)是天敵啊!   資深美女湫湫深諳“胖來如山倒,胖去如抽絲”的道理,所以她希望你能幫忙制定一個食譜,能使她吃得開心的同時,不會製造太多的天敵。   當然

原创 Zipper

Given three strings, you are to determine whether the third string can be formed by combining the characters in the fi