2 solutions

  • 3
    @ 2024-1-31 20:48:07

    a+b>c&&a+c>b&&c+b>c


    三角形成例 套几个if就好了🚀️

    • 2
      @ 2024-1-31 20:41:03
      #include<bits/stdc++.h>
      using namespace std;
      int a[1000];
      int main()
      {
      int a,b,c;
      cin >> a >> b >> c;
      if(a+b>c&&a+c>b&&c+b>a) cout << "YES" << endl;
      else cout << "NO" << endl;
      //so easy
      }
      
      • 1

      Information

      ID
      46
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      147
      Accepted
      106
      Uploaded By