摘要: 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) 编辑