2 solutions

  • 1
    @ 2023-10-6 9:54:02
    int main()
    {
        int a,b,c;
        scanf("%d %d %d",&a,&b,&c);
        if(a>b){
            if(a>c){
                if(b+c>a){
                    printf("yes");
                }else{
                    printf("no");
                }
            }else {
                if(a+b>c){printf("yes");
                }else{
                    printf("no");
                }
            }
        }else{
            if(b>c){
                if(a+c>b){
                    printf("yes");
                }else{
                    printf("no");
                }
            }else{
                if(a+b>c){
                    printf("yes");
                }else{
                    printf("no");
                }
            }
        }return 0;
    }
    
    
    • 0
      @ 2024-7-28 17:17:10
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          int a,b,c;
          cin>>a>>b>>c;
          if(a + b > c && a + c > b && b + c > a){
          cout<<"yes"<<endl;
          }else cout<<"no"<<endl;
          return 0;
      }
      
      • 1

      Information

      ID
      6732
      Time
      1000ms
      Memory
      128MiB
      Difficulty
      5
      Tags
      (None)
      # Submissions
      196
      Accepted
      77
      Uploaded By