virtue专题

PAT 1062 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 virt

浙大PAT 1062题 1062. Talent and Virtue

#include<stdio.h>#include<stdlib.h>#include<string.h>typedef struct Person{char id[10];int virtue;int talent;}person;//数组较大,开在main函数里面会出错; person ps[100005];person p1[100005];person p2[1000

1062. Talent and Virtue 解析

分组排序: vg,tg >= L 的才进入排序 vg.tg >= H的圣人 tg<H vg>=H的君子 tg<H,vg<H,vg>=vt的小人 剩下的君子。 然后再内部排序按总成绩,vg,id的顺序进行排序。 #include <iostream>#include <algorithm>#include <cstring>#include <climits>#includ

PAT---A1062. Talent and Virtue (25)

题目要求: 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 a

1062 Talent and Virtue (25 分) 排序

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 virt