题目:[NOIP2005 提高组] 谁拿了最多奖学金 - 洛谷
题目大意
根据分数来判断奖学金,并通过一定格式输出
数据范围
int足以
坑点
有两种数据类型:int char
代码
#include<iostream>
#include<stdio.h>
#include<fstream>
#include<algorithm>
#include<cmath>
#include<deque>
#include<vector>
#include<queue>
#include<string>
#include<cstring>
#include<map>
#include<stack>
#include<set>
using namespace std;
struct name
{
string s;//姓名
int a1;//期末平均分
int a2;//班级平均分
char xs;//学生干部
char xb;//西部学生
int l;//论文数
int xu;//输入文件次序
int sum;//总奖金
}num[110];
bool cmp(name n,name m)//比较函数
{
if(n.sum!=m.sum) return n.sum>m.sum;//比较大小,返回值
if(n.sum==m.s