上一页 1 ··· 12 13 14 15 16
摘要: ////2012/2/27//accepted//从后向前,每次寻找最大得煎饼,如果该煎饼在pancake[0]的位置,则把该煎饼翻转到合适的位置//否则,把该煎饼翻转大pancake[0]的位置,再把该煎饼翻转到合适的位置//5 4 5 3 1 2这组数据,应该先找到pancake[0]位置的5,否则把pancake[2]翻转到pancake[0]就死循环了//这一点在找最大值是控制一下#include<iostream>#include<algorithm>#include<sstream>usingnamespacestd;voidflip(intpo 阅读全文
posted @ 2012-02-28 16:40 AndyDHG 阅读(200) 评论(0) 推荐(0)
摘要: 题目信息Problem C: WERTYUA common typing error is to place the hands on the keyboard one row to the right of the correct position. So "Q" is typed as "W" and "J" is typed as "K" and so on. You are to decode a message typed in this manner.Input consists of several 阅读全文
posted @ 2012-02-14 17:46 AndyDHG 阅读(286) 评论(0) 推荐(0)
摘要: Where's Waldorf? Given a m by n grid of letters, (), and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line of letters in the grid. A word can match the letters in the grid regardless of case (i.e. upper and lower case let 阅读全文
posted @ 2012-02-14 07:45 AndyDHG 阅读(327) 评论(0) 推荐(0)
摘要: Problem A: Automated Judge Script The ProblemThe judges from the programming contests are known to be very mean and very lazy. We, judges, want less work and more Wrong Answers! So, we'd like you to help us and write an automated judge script to judge solution runs from teams all over the world. 阅读全文
posted @ 2011-12-21 15:49 AndyDHG 阅读(455) 评论(0) 推荐(0)
摘要: 题目描述: Problem B: Minesweeper The ProblemHave you ever played Minesweeper? It's a cute little game which comes within a certain Operating System which name we can't really remember. Well, the goal of the game is to find where are all the mines within a MxN field. To help you, the game shows a 阅读全文
posted @ 2011-12-18 09:09 AndyDHG 阅读(281) 评论(0) 推荐(0)
摘要: The 3n + 1 problem BackgroundProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs.The ProblemConside. 阅读全文
posted @ 2011-12-17 20:55 AndyDHG 阅读(138) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16