2 条题解

  • 0
    @ 2025-2-15 20:27:50

    Code

    #include <bits/stdc++.h>
    
    using namespace std;
    
    int n,ans=0,b=0;
    string c="   ";
    
    int f(int a){
    	if(a>=85){
    		return 4;
    	}
    	if(a>=45){
    		return 3;
    	}
    	if(a>=25){
    		return 2;
    	}
    	if(a>=1){
    		return 1;
    	}
    	return 0;
    }
    
    bool cmp(char a,char b){
    	return a>b;
    }
    
    int main(){
    	for(int x=0;x<3;x++){
    		cin>>n;
    		c[x]=char(f(n)+'0');
    	}
    	sort(c.begin(),c.end(),cmp);
    	if(c=="321" || c=="432" || c=="442" || c=="443" || c=="444"){
    		cout<<"Yes";
    	}else{
    		cout<<"No";
    	}
    	return 0;
    }
    

    信息

    ID
    101
    时间
    3000ms
    内存
    512MiB
    难度
    1
    标签
    递交数
    321
    已通过
    202
    上传者