上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 39 下一页
摘要: #include#include#include#include//greater 使得从小到大 ,less反//priority_queue, less > que 相当于 priority_queue que#includeusing namespace std;const int MAX =... 阅读全文
posted @ 2015-07-19 15:59 Painting、时光 阅读(509) 评论(0) 推荐(0) 编辑
摘要: We'll defineS(n)for positive integernas follows: the number of then's digits in the decimal base. For example,S(893) = 3,S(114514) = 6.You want to mak... 阅读全文
posted @ 2015-07-19 14:53 Painting、时光 阅读(232) 评论(0) 推荐(0) 编辑
摘要: lzs种了n棵树,每棵树每天长高一定的高度。某一天,lzs想知道树长得怎么样了,你能求出那一天最高的树有多高吗?Input有多组测试数据,每组数据第一行输入两个整数n,m(1#include#includeusing namespace std;const int MAX = 100000 + 10... 阅读全文
posted @ 2015-07-18 18:46 Painting、时光 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 由于计划生育的实行,我们以及将来几代人都会是独生子女,即每对夫妇只会有一个孩子。那么给你XXXX年某人的一张树形族谱,你能指出其中任意两人的关系吗?Input输入数据第一行一个整数T表示有T组数据。每组数据第一行一个正整数N (2 #include#include#includeusing name... 阅读全文
posted @ 2015-07-18 16:14 Painting、时光 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Given an array of positive integers and m queries.Each query contains i, j, x, output the number of occurrences of x into the subarray Ai,Ai+1...,Aj.I... 阅读全文
posted @ 2015-07-18 12:53 Painting、时光 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Wangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K different combinations of dressing.One day he wears his pants Nike, sho... 阅读全文
posted @ 2015-07-17 21:39 Painting、时光 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Rabbit Tom and rabbit Jerry are running in a field. The field is an N×N grid. Tom starts from the up-left cell and Jerry starts from the down-right ce... 阅读全文
posted @ 2015-07-17 21:37 Painting、时光 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Imagine that you have to prepare a problem set for the forthcoming programming contest and you have already chosen the problems you will use in it. Be... 阅读全文
posted @ 2015-07-17 21:34 Painting、时光 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Side onePoll flew above the City. Bright street lights flashed by below. He was winding his way around needle-sharp spires of communication towers and... 阅读全文
posted @ 2015-07-17 21:16 Painting、时光 阅读(313) 评论(0) 推荐(0) 编辑
摘要: DZY has a sequencea, consisting ofnintegers.We'll call a sequenceai, ai + 1, ..., aj(1 ≤ i ≤ j ≤ n)a subsegment of the sequencea. The value(j - i + 1)... 阅读全文
posted @ 2015-07-17 18:01 Painting、时光 阅读(175) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 39 下一页