結果

問題 No.3421 How Many Peaks?
コンテスト
ユーザー atcoder8
提出日時 2026-01-11 13:54:08
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 2 ms / 2,000 ms
+ 523µs
コード長 398 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,286 ms
コンパイル使用メモリ 187,764 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-20 05:23:54
合計ジャッジ時間 2,301 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

use proconio::input;

fn main() {
    input! {
        t: usize,
        mut abcd: [(i64, i64, i64, i64); t],
    }

    let output = abcd
        .iter()
        .map(|&(a, b, c, d)| if solve(a, b, c, d) { "Yes" } else { "No" })
        .collect::<Vec<_>>()
        .join("\n");
    println!("{output}");
}

fn solve(a: i64, b: i64, c: i64, _d: i64) -> bool {
    a != 0 && b.pow(2) > 3 * a * c
}
0