結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
Strorkis
|
| 提出日時 | 2021-05-15 10:59:22 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| コード長 | 503 bytes |
| コンパイル時間 | 13,445 ms |
| コンパイル使用メモリ | 401,604 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-02 17:16:27 |
| 合計ジャッジ時間 | 16,010 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
fn main() {
let ref mut buf = String::new();
std::io::Read::read_to_string(&mut std::io::stdin(), buf).ok();
let mut iter = buf.split_whitespace();
macro_rules! scan {
($t:ty) => (iter.next().unwrap().parse::<$t>().unwrap());
}
let mut won = false;
for a in (0..scan!(usize)).map(|_| scan!(u32)) {
if !won {
won = true;
} else if a == 1 {
won = false;
}
}
println!("{}", if won { "Alice" } else { "Bob" });
}
Strorkis