結果

問題 No.3421 How Many Peaks?
コンテスト
ユーザー littlegirl112
提出日時 2026-01-11 13:51:51
言語 C++17
(gcc 15.2.0 + boost 1.89.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 878 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,808 ms
コンパイル使用メモリ 214,284 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-01-11 13:51:59
合計ジャッジ時間 2,418 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
using ll = long long;
#define overload4(a, b, c, d, name, ...) name
#define rep1(n) for (ll i = 0; i < n; ++i)
#define rep2(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i < b; ++i)
#define rep4(i, a, b, c) for (ll i = a; i < b; i += c)
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
void solve();
int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    ll t = 1;
    cin >> t;
    for (int i = 1; i <= t; i++) solve();
    return 0;
}
ll dy[4] = {-1, 0, 1, 0}, dx[4] = {0, 1, 0, -1};
void solve() {
    ll a, b, c, d;
    cin >> a >> b >> c >> d;
    if (a == 0) {
        cout << "No" << endl;
        return;
    }
    ll D = 4 * b * b - 4 * 3 * a * c;
    cout << (D > 0 ? "Yes" : "No") << endl;
}
0