結果
問題 | No.601 Midpoint Erase |
ユーザー |
![]() |
提出日時 | 2017-12-01 00:16:38 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 612 bytes |
コンパイル時間 | 28,025 ms |
コンパイル使用メモリ | 388,116 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 03:10:37 |
合計ジャッジ時間 | 17,608 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
use std::io::Read;fn main() {let mut stdin = String::new();std::io::stdin().read_to_string(&mut stdin).unwrap();let mut stdin = stdin.split_whitespace().map(|x| x.parse::<i64>().unwrap() );let mut get = || stdin.next().unwrap();let n = get();let mut counts = vec![0; 4];for _ in 0..n {let x = get();let y = get();let i = (y % 2) * 2 + x % 2;counts[i as usize] += 1;}let mut count = 0;for c in &counts {count += c / 2;}let ans = if count % 2 == 0 { "Bob" } else { "Alice" };println!("{}", ans);}