4 条题解

  • 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;
    

    }

    信息

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