当前位置:网站首页>Los Angeles p1051 who won the most Scholarships
Los Angeles p1051 who won the most Scholarships
2022-06-24 07:47:00 【Deng sb.'s father】
P1051 Who got the most Scholarships
#include <iostream>
using namespace std;
struct student
{
string name;
int grade1, grade2;
char identy1, identy2;
int papers;
int money=0;
};
int main()
{
int n;
cin >> n;
student stu[n];
student Max;
int sum=0;
for (int i = 0; i < n; i++)
{
cin >> stu[i].name >> stu[i].grade1 >> stu[i].grade2 >> stu[i].identy1 >> stu[i].identy2 >> stu[i].papers;
stu[i].money=0;
if(stu[i].grade1>80&&stu[i].papers>0)
stu[i].money+=8000;
if(stu[i].grade1>85&&stu[i].grade2>80)
stu[i].money+=4000;
if(stu[i].grade1>90)
stu[i].money+=2000;
if(stu[i].grade1>85&&stu[i].identy2=='Y')
stu[i].money+=1000;
if(stu[i].grade2>80&&stu[i].identy1=='Y')
stu[i].money+=850;
if(Max.money<stu[i].money)
Max=stu[i];
sum+=stu[i].money;
}
printf("%s\n%d\n%d\n",Max.name.c_str(),Max.money,sum);
}
边栏推荐
- Climbing 10000 NASA pictures about Mars exploration, I found a secret
- Experience of Shenzhou computer
- 简单的折射效果
- Overview of C program operation mechanism
- L2tp/ipsec one click installation script
- Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
- MySQL case: analysis of full-text indexing
- Actual target shooting - skillfully use SMB to take down the off-line host
- Error "computing failed in `stat\u summary\u hex() `"
- The seminar on "global IPv6 development and outlook 2020-2021" was held in Beijing
猜你喜欢

Cloud development who is the source code of undercover applet

Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its

Maxcompute remote connection, uploading and downloading data files

The two most frequently asked locks in the interview

免费ICP域名备案查接口

Shader 常用函数

RDD的执行原理

LeetCode 207:课程表(拓扑排序判断是否成环)
![Selector (>, ~, +, [])](/img/7e/2becfcf7a7b2e743772deee5916caf.png)
Selector (>, ~, +, [])

Hongmeng OS development III
随机推荐
GPU is not used when the code is running
Error "computing failed in `stat\u summary\u hex() `"
Common coding and encryption in penetration testing
免费ICP域名备案查接口
Detailed explanation of C language compilation, link and operation
opencvsharp二值图像反色
Only two lines are displayed, and the excess part is displayed with Ellipsis
Combine with (& &) logic or (||), dynamic binding and ternary operation
Domain environment importing Tencent cloud considerations
Hubei College Upgraded to undergraduate - Hushi family planning department
Selector (>, ~, +, [])
关于h5页面苹果手机使用fixed定位tabbar最底部时遮挡内容问题
How to realize multi protocol video capture and output in video surveillance system?
exness:鲍威尔坚持抗通胀承诺,指出衰退是可能的
How VPN works
【NILM】非入侵式负荷分解模块nilmtk安装教程
BOM笔记
Global and Chinese markets for food puffers 2022-2028: Research Report on technology, participants, trends, market size and share
[vulhub shooting range]] ZABBIX SQL injection (cve-2016-10134) vulnerability recurrence
10 common malware detection and analysis platforms