結果
| 問題 | No.3421 How Many Peaks? |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-11 13:55:57 |
| 言語 | Rust (1.92.0 + proconio + num) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 522 bytes |
| 記録 | |
| コンパイル時間 | 25,601 ms |
| コンパイル使用メモリ | 413,060 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-11 13:56:27 |
| 合計ジャッジ時間 | 24,326 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
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 i32).pow(2) - 3 * a as i32 * c as i32 > 0)
.collect()
}
fn output(ans: Vec<bool>) -> String {
ans.into_iter()
.map(|x| if x { "Yes" } else { "No" })
.collect::<Vec<_>>()
.join("\n")
}