文章
34
粉丝
316
获赞
10
访问
22.3k
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
while (cin >> n)
{
vector<int> data(n);
for (int i = 0; i < data.size(); i++)
{
cin >> data[i];
}
int max = *max_element(data.begin(), data.end());
cout << max << endl;
data.erase(max_element(data.begin(), data.end()));
sort(data.begin(), data.end());
for (int i = 0; i < n-1; i++)
{
cout << data[i] << &quo...
登录后发布评论
暂无评论,来抢沙发