結果
| 問題 | No.601 Midpoint Erase |
| コンテスト | |
| ユーザー |
夕叢霧香(ゆうむらきりか)
|
| 提出日時 | 2017-12-01 00:03:29 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 324 ms / 2,000 ms |
| コード長 | 1,756 bytes |
| 記録 | |
| コンパイル時間 | 2,495 ms |
| コンパイル使用メモリ | 78,160 KB |
| 実行使用メモリ | 47,024 KB |
| 最終ジャッジ日時 | 2024-12-23 03:08:09 |
| 合計ジャッジ時間 | 7,024 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) {
MyScanner sc = new MyScanner();
out = new PrintWriter(new BufferedOutputStream(System.out));
int[][]c=new int[2][2];
int n=sc.nextInt();
for(int i=0;i<n;++i){
int x=sc.nextInt();
int y=sc.nextInt();
c[x%2][y%2]++;
}
int t=c[0][0]/2+c[0][1]/2+c[1][0]/2+c[1][1]/2;
out.println(t%2==0?"Bob":"Alice");
out.close();
}
// http://codeforces.com/blog/entry/7018
//-----------PrintWriter for faster output---------------------------------
public static PrintWriter out;
//-----------MyScanner class for faster input----------
public static class MyScanner {
BufferedReader br;
StringTokenizer st;
public MyScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine(){
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
}
夕叢霧香(ゆうむらきりか)