結果
問題 | No.601 Midpoint Erase |
ユーザー |
![]() |
提出日時 | 2017-12-01 11:17:03 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 65 ms / 2,000 ms |
コード長 | 530 bytes |
コンパイル時間 | 680 ms |
コンパイル使用メモリ | 98,264 KB |
実行使用メモリ | 7,380 KB |
最終ジャッジ日時 | 2024-06-12 22:43:44 |
合計ジャッジ時間 | 2,029 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
void main(){import std.stdio, std.string, std.conv, std.algorithm;int n; rd(n);long[4] cnt;foreach(_; 0..n){int x, y; rd(x, y);if((x&1)&&(y&1)) cnt[0]++;else if(x&1) cnt[1]++;else if(y&1) cnt[2]++;else cnt[3]++;}auto sum=reduce!((r, e)=>r+e/2)(0L, cnt);if(sum&1) writeln("Alice");else writeln("Bob");}void rd(T...)(ref T x){import std.stdio, std.string, std.conv;auto l=readln.split;assert(l.length==x.length);foreach(i, ref e; x){e=l[i].to!(typeof(e));}}