- 奖学金
- 2009-11-06 20:19:27 @
#include
#include
using namespace std;
struct stu
{
int xuehao;
int yuwen;
int shuxue;
int yingyu;
int zongfen;
};
int cmp(const void *m,const void *n)
{
return *(int*)n-*(int*)m;
}
int main()
{
int n,k[10001];
struct stu a[10001];
while(cin>>n)
{
for(int i=0;i>a[i].yuwen>>a[i].shuxue>>a[i].yingyu;
a[i].zongfen=a[i].yuwen+a[i].shuxue+a[i].yingyu;
a[i].xuehao=i+1;
k[i]=100000*a[i].zongfen+1000*a[i].yuwen-a[i].xuehao;
}
qsort(k,n,sizeof(k[0]),cmp);
for(int i=0;i
0 条评论
目前还没有评论...