1 条题解

  • 0
    @ 2025-1-1 18:46:03

    直接暴打 O(1)O(1) awa...

    #include<bits/stdc++.h>
    #define int long long
    #define INF 0x3f3f3f
    using namespace std;
    int mx,ms,x,now=1;
    signed main(){
    	cin>>x;
    	if(x>mx){
    		mx=x;
    		ms=now;
    	}
    	now++;
    	cin>>x;
    	if(x>mx){
    		mx=x;
    		ms=now;
    	}
    	now++;
    	cin>>x;
    	if(x>mx){
    		mx=x;
    		ms=now;
    	}
    	now++;
    	cin>>x;
    	if(x>mx){
    		mx=x;
    		ms=now;
    	}
    	now++;
    	cin>>x;
    	if(x>mx){
    		mx=x;
    		ms=now;
    	}
    	now++;
    	cin>>x;
    	if(x>mx){
    		mx=x;
    		ms=now;
    	}
    	cout<<ms;
    	return 0;
    }
    

    C++:你写个循环会s是吧。。。

    • 1

    信息

    ID
    67
    时间
    1000ms
    内存
    128MiB
    难度
    10
    标签
    递交数
    6
    已通过
    6
    上传者