02 2012 档案

摘要://题目信息http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1072//本题主要是用动态规划。参考寂静山林的博客,写的非常详细(http://blog.csdn.net/metaphysis/article/details/6860405),这里只是做个个人随笔记录//2012/2/28//accepted//#include<iostream>#include<algorithm>#include< 阅读全文
posted @ 2012-02-28 17:50 AndyDHG 阅读(404) 评论(0) 推荐(0)
摘要:////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 阅读(190) 评论(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 阅读(279) 评论(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 阅读(321) 评论(0) 推荐(0)