3 条题解

  • 1
    @ 2022-8-8 18:43:56
    #include <queue>
    #include <math.h>
    #include <stack>
    #include <stdio.h>
    #include <iostream>
    #include <vector>
    #include <iomanip>
    #include <string.h>
    #include <algorithm>
    using namespace std;
    int main()
    {
    	int a,b,y,m=0,ans=0;
    	for(int i=1;i<=7;i++)
    	{
    		cin >>a>> b;
    		y=a+b;
    		if((y>m)&&(y>8))m=y,ans=i;
    	}
    	cout << ans;
    	return 0;
    }
    
    • 0
      @ 2026-3-29 15:33:11
      #include<iostream>
      using namespace std;
      int a,b,y,m,s;
      int main(){
      	for(int i=1;i<=7;i++){
      		cin>>a>>b;
      		y=a+b;
      		if(y>m && y>8)
      			m=y,s=i;
      	}
      	cout<<s;
      	return 0;
      }
      • 0
        @ 2022-8-25 14:22:41

        #include using namespace std; int main(){ int a[100],b[100],c[100],k; for(int i=1;i<=7;i++){ cin>>a[i]>>b[i]; c[i]=a[i]+b[i]; } k=1; for(int i=2;i<=7;i++){ if(c[i]>c[k]){ k=i; } } cout<<k; }

        • 1

        信息

        ID
        670
        时间
        1000ms
        内存
        256MiB
        难度
        5
        标签
        递交数
        120
        已通过
        46
        上传者