#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <string>
using namespace std;
int testscore[] = {67, 56, 24, 78, 99, 87, 56};
bool pass(int n)
{
if (n>=60)
return true;
else
return false;
}
void main()
{
vector<int> score(testscore,testscore+sizeof(testscore)/sizeof(int));
vector<int>::iterator it;
for (it=score.begin();it!=score.end();it++)
{
cout<<*it<<"";
}
cout<<endl;
sort(score.begin(),score.end());
for (it=score.begin();it!=score.end();it++)
{
cout<<*it<<"";
}
cout<<endl;
it=max_element(score.begin(),score.end());
cout<<"max is:"<<*it<<endl;
it=min_element(score.begin(),score.end());
cout<<"min is:"<<*it<<endl;
for (it=score.begin();it!=score.end();it++)
{
if(!pass(*it))
{
cout<<*it<<endl;
}
}
cout<<"the number of pass people:"<<count_if(score.begin(),score.end(),pass)<<endl;
int total=accumulate(score.begin(),score.end(),0);
cout<<total<<endl;
}