POJ2442Sequence】的更多相关文章

http://poj.org/problem?id=2442 题意 :就是输入m个数集,每个含n个数,求从每个集合取一个数后,按非降序输出前n小的和. 思路 : 本来打算是用几个for循环的,后来觉得要是真这么简单就不会在堆里分类了,所以,经过会神详细指导讲解,略懂略懂,弄俩优先队列,正好搞定 #include<cstdio> #include<cstring> #include<queue> #include<vector> #include<ios…
POJ-2442 Description Given m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's clear that we may get n ^ m this kind of sequences. Then we can calculate the sum o…