摘要:
You want to processe a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending order. Then how many times it need.For example, 1 2 3 5 4, we only need one operation : swap 5 and 4.输入The input consists of a number of test cases. Each case c 阅读全文
posted @ 2013-03-16 14:53
heity
阅读(145)
评论(0)
推荐(0)
摘要:
描述春天到了,花儿朵朵盛开,hrdv是一座大花园的主人,在他的花园里种着许多种鲜花,每当这个时候,就会有一大群游客来他的花园 欣赏漂亮的花朵,游客们总是会询问,某个时间有多少种花儿同时在盛开着?hrdv虽然知道每种花儿的开花时间段,但是他不能很快的答出游客的问题,你能编 写一个程序帮助他吗?输入第一行有个整数t,表示有t组测试数据,每组测试数据第一行为两个整数 n,m(0<n<100000,0<m<100000);随后有n行,每一行有两个整数 x,y(0<x<y<1000000000),表示这一种花的盛开时间是从x到y;随后有m行,每行有一个整数,代表 阅读全文
posted @ 2013-03-16 12:07
heity
阅读(246)
评论(0)
推荐(0)

浙公网安备 33010602011771号