大佬帮帮忙,p1085不高兴的津津,#12hack过不了
查看原帖
大佬帮帮忙,p1085不高兴的津津,#12hack过不了
1421152
xumingyang666楼主2024/8/12 21:04
#include<bits/stdc++.h>
using namespace std;
int main(){
	int maxx=0,pos=0x3f3f3f3f;
	for(int i=1;i<=7;i++){
		int a,b;
		cin>>a>>b;
		if(a+b>=8&&maxx<a+b){
			maxx=max(maxx,a+b);
			pos=i;
		}
	}
	if(maxx!=0){
		cout<<pos;
	}else{
		cout<<"0";
	}
	return 0;
}
2024/8/12 21:04
加载中...