js13kbgames

#include<iostream>
using namespace std;
struct cl{
	string name;
	int qimo;
	int banji;
	char ganbu;
	char west;
	int lun;
	int jiang;
};
int main(){
	int N,max=0;
	cin>>N;
	cl a[N];
	for(int i=0;i<N;i++){
		cin>>a[i].name;
		cin>>a[i].qimo;
		cin>>a[i].banji;
		cin>>a[i].ganbu;
		cin>>a[i].west;
		cin>>a[i].lun;
		a[i].jiang=0;
		if(a[i].qimo>80){
			if(a[i].lun>0){
				a[i].jiang+=8000;
			}
			if(a[i].qimo>85){
				if(a[i].banji>80){
					a[i].jiang+=4000;
				}
				if(a[i].west=='Y'){
					a[i].jiang+=1000;
				}
			}
			if(a[i].qimo>90){
				a[i].jiang+=2000;
			}
		}
		if(a[i].banji>80&&a[i].ganbu=='Y'){
			a[i].jiang+=850;
		}
		max+=a[i].jiang;
	}
	int n;
	int min=a[0].jiang;
    for(int i=1;i<N;i++){	
    	if(min<a[i].jiang){
    		n=i;
    		min=a[i].jiang;
		}
	}
	cout<<a[n].name<<endl<<a[n].jiang<<endl<<max;
	return 0;
}

  

https://blog.csdn.net/qq_45277554/article/details/132899848

 

https://js13kgames.com/

posted @ 2024-05-04 15:27  陈若麟  阅读(77)  评论(0编辑  收藏  举报