[LeetCode][Java] Rotate List
題目: Given a list, rotate the list to the right by k places, where k is non-
Codeforces 321A Ciel and Robot 枚舉答案
枚舉機器人走的最後一步,用終點坐差後計算周期次數trick:周期次數要>=0 #include #include #include
poj 2774 Long Long Message(後綴數組)
??題意:給定兩個字符串A 和B,求最長公共子串。思路:將兩個字符串連接起來中間用一個沒出現過的符號分割,所以答案為滿足後綴在不同的串中且height值最大的h
Codeforces Round #304 (Div. 2) C. Soldier and Cards stl應用
C. Soldier and Cards time limit per test 2 seconds memory limit per test 256 meg
POJ 2003 Hire and Fire (多重鏈表 樹結構 好題)
Hire and Fire Time Limit: 1000MS Memory Limit: 30000K Total Subm
C++11代碼展示:簡單的手勢識別和響應,上下左右
因為這個是跑酷類游戲的代碼,所以向左向右就按照正常的邏輯,上下滑動本來應該是要執行跳躍操作的,暫時場景屬於靜止狀態,所以先邏輯暫時未拉動攝像機前後移動。&nbs
Codeforces Round #311 (Div. 2) A,B,C,D,E
A. Ilya and Diplomas思路:水題了, 隨隨便便枚舉一下,分情況討論一下就OK了。 code: #include #incl
BNUOJ 1038 Flowers(BFS)
FlowersTime Limit: 1000ms Memory Limit: 65535KB 64-bit integer IO format: %lld J
HDU4149 Magic Potion(位運算)
題意:給出x1,x2,x3,x4,x5,x6,x7,x8與某值m進行異或運算後的結果,再給出x1~x8之和與m進行異或運算後的結果sum,求m.思路