1 条题解

  • 0
    @ 2025-9-9 23:45:56

    C++ :

    #include<iostream>
    #include<cstdio>
    using namespace std;
    int main()
    {
    	//freopen("unhappy.in","r",stdin);
    	//freopen("unhappy.out","w",stdout);
    	int flag=-1,my_max=-1,a,b;
    	for(int i=1;i<=7;++i)
    	{
    		cin>>a>>b;
    		if(a+b>my_max)
    		{
    			my_max=a+b;
    			flag=i;
    		}
    	}
    	if(my_max>8)cout<<flag<<endl;
    	else cout<<0<<endl;
    	return 0;
    }
    
    • 1

    信息

    ID
    822
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者