結果

問題 No.3421 How Many Peaks?
コンテスト
ユーザー elphe
提出日時 2026-01-11 13:52:08
言語 Rust
(1.92.0 + proconio + num)
結果
WA  
実行時間 -
コード長 522 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 24,397 ms
コンパイル使用メモリ 414,368 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-01-11 13:52:37
合計ジャッジ時間 25,270 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {
        testcases: [(i8, i8, i8, i8)],
    }

    println!("{}", output(solve(testcases)));
}

fn solve(testcases: Vec<(i8, i8, i8, i8)>) -> Vec<bool> {
    testcases
        .into_iter()
        .map(|(a, b, c, _)| a != 0 && (b as i16).pow(2) - 3 * a as i16 * c as i16 > 0)
        .collect()
}

fn output(ans: Vec<bool>) -> String {
    ans.into_iter()
        .map(|x| if x { "Yes" } else { "No" })
        .collect::<Vec<_>>()
        .join("\n")
}
0