結果

問題 No.2508 Discriminant
ユーザー Syed Shakil Mahmud (Shajib)Syed Shakil Mahmud (Shajib)
提出日時 2023-10-20 21:54:55
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 390 bytes
コンパイル時間 460 ms
コンパイル使用メモリ 63,492 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 21:55:45
合計ジャッジ時間 1,234 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 4 ms
4,348 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 WA -
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 WA -
testcase_16 AC 2 ms
4,348 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 1 ms
4,348 KB
testcase_22 AC 1 ms
4,348 KB
testcase_23 WA -
testcase_24 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main() {
    // Read input
    int a, p, q;
    std::cin >> a >> p >> q;

    // Calculate coefficients for the second-degree polynomial ax^2 + bx + c
    int b = -(p + q);
    int c = p * q;

    // Check if b^2 > 4ac
    if (b * b > 4 * a * c) {
        std::cout << "Yes" << std::endl;
    } else {
        std::cout << "No" << std::endl;
    }

    return 0;
}
0