摘要: 题目大意就是给出一个字典,找出其中不能通过打乱字母顺序后组成新单词的 那些单词(稍微有点绕)我写的相当繁琐,晚上回去要研究一下stl写法题目:AnanagramsMost crossword puzzle fans are used toanagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POTS and POST. Some words however do not have this attribute, no matter how you re 阅读全文
posted @ 2013-11-13 17:46 doubleshik 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 给出一串表达式,大写是运算符,小写是类似数字,然后要求输出层序遍历先根据表达式建树然后进行层序遍历Problem E: ExpressionsArithmetic expressions are usually written with the operators in between the two operands (which is called infix notation). For example,(x+y)*(z-w)is an arithmetic expression in infix notation. However, it is easier to writ 阅读全文
posted @ 2013-11-13 16:21 doubleshik 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 题目给出 N个天数, X个party数,然后X行是每个PARTY罢工的周期m,计算在N天内一共罢工的天数是多少,一天内如果有一个以上party罢工就算一次题目Problem D: HartalsA social research organization has determined a simple set of parameters to simulate the behavior of the political parties of our country. One of the parameters is a positive integerh(called thehartal pa 阅读全文
posted @ 2013-11-13 14:46 doubleshik 阅读(256) 评论(0) 推荐(0) 编辑