解题思路:
注意事项:
参考代码:
#include <deque>
#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <iterator>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <string>
#include <cmath>
#include <string.h>
#define V 1001
using namespace std;
int main()
{
int n;
int k=0;
deque<int> q[1001];
while(cin>>n)
{
for(int i=0;i<n;i++)
{
int num;
cin>>num;
q[k].push_back(num);
}
sort(q[k].rbegin(),q[k].rend());
k++;
}
for(int i=0;i<k;i++)
{
copy(q[i].begin(),q[i].end(),ostream_iterator<int>(cout," "));
cout<<endl;
}
return 0;
}
0.0分
0 人评分
川哥的吩咐 (C语言代码)浏览:875 |
高精度加法 (C++代码)(大数加法)浏览:934 |
C语言程序设计教程(第三版)课后习题10.5 (C语言代码)浏览:552 |
【排队买票】 (C语言代码)浏览:900 |
WU-复数求和 (C++代码)浏览:2015 |
字符串的输入输出处理 (C语言代码)浏览:1009 |
简单的a+b (C语言代码)浏览:541 |
敲七 (C语言代码)浏览:2701 |
C语言程序设计教程(第三版)课后习题8.2 (C语言代码)浏览:1034 |
C语言程序设计教程(第三版)课后习题9.6 (C语言代码)浏览:563 |