6 solutions

  • 0
    @ 2025-2-4 11:53:39
    #include<bits/stdc++.h>
    using namespace std;
    short n;
    long double a,b,c;
    int main(){
       cin>>n;
       for(int i=1;i<=n;i++){
          cin>>a>>b>>c;
          if(a+b>c) cout<<"YES"<<endl;
          else cout<<"NO"<<endl;}
       return 0;
    }
    

    //高精度不可能的 //这都可以??!!!

    • 0
      @ 2024-12-10 18:52:16
      # include<bits/stdc++.h>
      using namespace std;
      int main(){
      	int t;
      	long double a,b,c;
      	cin >>t;
      	for (int i=0;i<t;i++){
      		cin >>a>>b>>c;
      		if (a+b>c){
      			cout <<"YES\n";
      		}
      		else {
      			cout <<"NO\n";
      		}
      	}
      	return 0;
      }
      
      • -1
        @ 2023-12-1 21:28:53
        #include<bits/stdc++.h>
        using namespace std;
        int main(){
            int n;
            cin>>n;
            for(int i=0;i<n;i++){
                long double a,b,c;
                string x;
                cin>>a>>b>>c;
                x=a+b>c?"YES":"NO";
                cout<<x<<endl;
            }
            return 0;
        }
        //////////sssssssss
        //fangweibiaoji...........n
        
        • -1
          @ 2023-12-1 19:51:51
          long double太牛了
          128位去存储
          
          #include<iostream>
          using namespace std;
          int main()
          {
           int t;
           cin>>t;//输入次数
           long double A,B,C;//用long double
           while(t--)
           {
            cin>>A>>B>>C;//输入
            if(A+B>C)//判断是否成立
            {
             cout<<"YES\n";
            }
            else
            {
             cout<<"NO\n";
            }
           }
           return 0;//完结散花
          }
          
          • -2
            @ 2023-12-2 14:49:20
            #include<bits/stdc++.h>;
            using namespace std;
            long double a,b,c;
            long long t;
            int main(){
            	cin>>t;
            	for(int i=0;i<t;i++){
            		cin>>a>>b>>c;
            		if(a+b>c) cout<<"YES"<<endl;
            		else cout<<"NO"<<endl;
            	}
            	return 0;
            }
            

            论long double为什么是神

            • -4
              @ 2023-11-25 16:50:03
              #include<bits/stdc++.h>
              using namespace std;
              long long a,b,c;
              long long t;
              int main(){
              	cin>>t;
              	for(long long i=0;i<t;i++){
              		cin>>a>>b>>c;
              		if(c-a-b>=0) cout<<"NO"<<endl;
              		else cout<<"YES"<<endl;
              	}
              	return 0;//不必多言 
              }
              

              坑啊

            • 1

            Information

            ID
            949
            Time
            1000ms
            Memory
            256MiB
            Difficulty
            7
            Tags
            (None)
            # Submissions
            211
            Accepted
            50
            Uploaded By