結果
問題 |
No.2836 Comment Out
|
ユーザー |
|
提出日時 | 2024-08-09 22:04:39 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 331 bytes |
コンパイル時間 | 12,104 ms |
コンパイル使用メモリ | 377,160 KB |
実行使用メモリ | 5,504 KB |
最終ジャッジ日時 | 2024-08-09 22:04:54 |
合計ジャッジ時間 | 13,965 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 28 WA * 24 |
ソースコード
fn main() { proconio::input! { n: usize, a: [i64; n], } let total_diff = a[0] + a.iter() .zip(a.iter().skip(1)) .map(|(x, y)| (y - x).max(0)) .sum::<i64>(); if total_diff <= n as i64 { println!("Yes"); } else { println!("No"); } }