4 条题解

  • 3
    @ 2026-5-30 14:53:00
    #include <bits/stdc++.h>
    using namespace std;
    
    int main() {
    freopen("judge.in", "r", stdin);
    freopen("judge.out", "w", stdout);
    //judge题必须有。
    // 定义三个变量存储边长
        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;
    }
    
    • 3
      @ 2026-5-16 18:37:25

      温馨提示,这题RTE的同学把这段代码复制放在如下位置

      int main(){
          _________
          _________
      

      该题要多补充的是:

          freopen("judge.in", "r", stdin);
          freopen("judge.out", "w", stdout);
      
      • @ 2026-5-30 8:07:42
        ???????
      • @ 2026-5-30 10:23:14

        谢谢! 我还在看为什么会错呢? 现在才看见是传统题。

    • 1
      @ 2026-5-31 17:06:54

      #include <bits/stdc++.h> using namespace std;

      //main 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
        @ 2026-5-31 11:01:02

        #include <bits/stdc++.h> using namespace std;

        int main() { freopen("judge.in", "r", stdin); freopen("judge.out", "w", stdout); //judge题必须有。 // 定义三个变量存储边长 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

        信息

        ID
        30940
        时间
        1000ms
        内存
        256MiB
        难度
        9
        标签
        (无)
        递交数
        67
        已通过
        7
        上传者