2025-03-31 00:24:59
#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
#include<iterator>
using namespace std;
int main()
{
vector<int> ivec;
cout<<"input the num";
int num;
while(cin>>num)
{
ivec.push_back(num);
}
cout<<"the size of the array is "<<ivec.size()<<endl;
sort(ivec.begin(),ivec.end());
cout<<" 排序后";
copy(ivec.begin(),ivec.end(),ostream_iterator<int>(cout," "));
return 0;
}
2025-03-31 00:50:04
2025-03-31 01:03:30
2025-03-31 00:40:29
2025-03-31 00:17:48