#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int testscore[] = {67, 56, 24, 78, 99, 87, 56};

void main()
{
vector<int> score(testscore,testscore+sizeof(testscore)/sizeof(int));
vector<int>::iterator it;

copy(score.begin(),score.end(),ostream_iterator<int>(cout,""));
cout<<endl;

sort(score.begin(),score.end());

copy(score.begin(),score.end(),ostream_iterator<int>(cout,""));
cout<<endl;

it=unique(score.begin(),score.end());
copy(score.begin(),it,ostream_iterator<int>(cout,""));

}

相关文章:

  • 2022-12-23
  • 2022-01-05
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-25
  • 2021-06-27
  • 2021-11-24
  • 2021-07-29
  • 2021-10-20
  • 2021-12-05
相关资源
相似解决方案