PAT-A1062

#include
#include
#include
using namespace std;
struct people{
	char id[16];
	int tanlent;
	int vietue;
	int clas;
}peo[100010];
bool cmp(people a, people b){
	if( a.clas!=b.clas )return a.clas(b.vietue+b.tanlent);
	         else if(a.vietue!=b.vietue) return a.vietue>b.vietue;
			          else	return strcmp(a.id,b.id)<0;
}

int main(){
int i, n, low, high, m=0;
scanf("%d%d%d",&n,&low,&high);    //输入n,low,high
for(i=0;i=low&&peo[i].tanlent>=low){m++;
		if(peo[i].vietue>=high&&peo[i].tanlent>=high){peo[i].clas=1;}
		if(peo[i].vietue>=high&&peo[i].tanlent=peo[i].tanlent){peo[i].clas=3;}
		if(peo[i].vietue

你可能感兴趣的:(PAT甲级)