結果
| 問題 | No.1219 Mancala Combo |
| コンテスト | |
| ユーザー |
Strorkis
|
| 提出日時 | 2020-09-13 16:03:15 |
| 言語 | Rust (1.93.0 + proconio + num + itertools) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 628 bytes |
| 記録 | |
| コンパイル時間 | 2,763 ms |
| コンパイル使用メモリ | 192,896 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-05 19:44:19 |
| 合計ジャッジ時間 | 4,538 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 WA * 1 |
ソースコード
fn main() {
let n: usize = {
let mut buf = String::new();
std::io::stdin().read_line(&mut buf).unwrap();
buf.trim_end().parse().unwrap()
};
let a: Vec<i32> = {
let mut buf = String::new();
std::io::stdin().read_line(&mut buf).unwrap();
let iter = buf.split_whitespace();
iter.map(|x| x.parse().unwrap()).collect()
};
let mut sum = 0;
for i in (0..n).rev() {
if (a[i] + sum) % (i as i32 + 1) == 0 {
sum += (a[i] + sum) / (i as i32 + 1);
} else {
return println!("No");
}
}
println!("Yes");
}
Strorkis