#include #include #include #include "stat.h" #include "player.h" using namespace std ; int main() { priority_queue H ; Player p ; string str ; unsigned int g, n ; int r ; stat x ; while (1) { cin >> str >> n ; if (cin.eof()) break ; p = Player(str) ; for (unsigned int i = 0 ; i < n ; i++) { cin >> g >> r ; x.game = g ; x.pmRating = r ; p.AddStat(x) ; } // p.debug() ; H.push(p) ; } cout << "The top five players are:" << endl ; for (int i = 1 ; i <= 5 ; i++) { cout << endl ; (H.top()).PrintAll() ; H.pop() ; } cout << endl << endl << "The rest of the team:" << endl ; while ( !H.empty() ) { (H.top()).Print() ; H.pop() ; } }