#include #include #include #include using namespace std; typedef struct { string name; int points; int goals; } team_t; bool comp(const team_t &a, const team_t &b) { return a.points > b.points || (a.points == b.points && a.goals > b.goals) || (a.points == b.points && a.goals == b.goals && a.name teams(4); int nrt=0; for(int i=0;i<6;++i){ string t1,t2; int g1,g2; cin>>t1>>t2>>g1>>g2; int which1=0; while(which1g2) teams[which1].points+=3; else if(g2>g1) teams[which2].points+=3; else{ teams[which1].points+=1; teams[which2].points+=1; } } sort(teams.begin(),teams.end(),comp); for(int i=0;i<4;++i) cout<