結果
問題 | No.2451 Redistribute Integers |
ユーザー |
|
提出日時 | 2024-07-20 20:19:06 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 43 ms / 2,000 ms |
コード長 | 294 bytes |
コンパイル時間 | 22,308 ms |
コンパイル使用メモリ | 375,084 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-07-20 20:19:32 |
合計ジャッジ時間 | 17,039 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
fn g() -> Vec<i64> {let mut s = String::new();std::io::stdin().read_line(&mut s).ok();s.split_whitespace().flat_map(str::parse).collect()}fn main() {let n = g()[0];let a = g();let f = |x| ((x - a[0]) % n + n) % n < 1;println!("{}", if a.iter().all(f) { "Yes" } else { "No" })}