1 条题解

  • 0
    @ 2024-8-12 21:42:14

    #include #include using namespace std;

    int main() { int a, b, c; cin >> a >> b >> c;

    if (a + b <= c || a + c <= b || b + c <= a) {
        cout << "no" << endl;
        return 0;
    }
    
    int maxSide = max(a, max(b, c));
    int sum = a * a + b * b + c * c - maxSide * maxSide;
    if (sum == maxSide * maxSide) {
        cout << "yes" << endl;
    } else {
        cout << "no" << endl;
    }
    
    return 0;
    

    }

    • 1

    信息

    ID
    69
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    (无)
    递交数
    99
    已通过
    40
    上传者