摘要:
Catch That CowTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 29149Accepted: 8967DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100, 阅读全文
posted @ 2012-05-07 17:00
w0w0
阅读(168)
评论(0)
推荐(0)
摘要:
Knight MovesTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8049Accepted: 4678DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard 阅读全文
posted @ 2012-05-07 15:41
w0w0
阅读(165)
评论(0)
推荐(0)
摘要:
迷宫问题Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4323Accepted: 2476Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × 5的二维数组,表示一个迷宫。数据保证有唯一解。Out 阅读全文
posted @ 2012-05-07 14:45
w0w0
阅读(204)
评论(0)
推荐(0)
浙公网安备 33010602011771号