#include <iostream>
#include <algorithm>
using namespace std;
class Student {
public:
string name;
int score;
Student(string name, int score) {
this-> name = name;
this-> score = score;
}
bool operator < (const Student & student)const {
return this -> score < student.score;
}
};
int main(void)
{
Student students[] = {
Student("일번",90),
Student("이번",93),
Student("삼번",97),
Student("사번",87),
Student("오번",92)
};
sort(students, students + 5);
for(int i = 0; i < 5; i++)
{
cout << students[i].name << ' ';
}
}