A1062 Talent and Virtue (德才论) About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people’s talent and virtue. According to his theory, a man being outstanding in both talent and virtue must be a “sage(
水题~。 struct Node { string id; int virtue,talent; int total; bool operator<(const Node &W) const { if(total == W.total) { if(virtue == W.virtue) return id<W.id; else retu
About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent and virtue must be a "sage(圣人)"; being less exce
代码如下: //排序 #include<iostream> #include<string> #include<algorithm> #include<vector> using namespace std; struct people{ int id; int v_grade;//美德成绩 int t_grade;//智力成绩 int total;//总成绩 }; vector<people> sage;//