有五个选手“ABCDE”,10个评委打分,去掉一个最高分,去掉一个最低分,最终得平均分
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
#include<vector>
#include<deque>
#include<algorithm>
#include<ctime>
using namespace std;
class Person//创建选手类
{
public:
Person(string n,int s)
{
this->name = n;
this->score = s;
}
public:
string name;
int score;
};
void show(const vector<Person>&p)//打印输出选手信息
{
for (vector<Person>::const_iterator i = p.begin(); i != p.end(); i++)//用迭代器遍历VECTOR容器
{
cout <<(*i).name << " 平均分:" << (*i).score << endl;
}
}
void creatPerson(v