結果
問題 | No.601 Midpoint Erase |
ユーザー |
![]() |
提出日時 | 2017-12-01 22:52:35 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 828 ms / 2,000 ms |
コード長 | 1,389 bytes |
コンパイル時間 | 2,383 ms |
コンパイル使用メモリ | 77,228 KB |
実行使用メモリ | 53,000 KB |
最終ジャッジ日時 | 2024-12-23 03:23:26 |
合計ジャッジ時間 | 11,618 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
import java.io.OutputStream;import java.io.IOException;import java.io.InputStream;import java.io.PrintWriter;import java.util.Scanner;/*** Built using CHelper plug-in* Actual solution is at the top*/public class Main {public static void main(String[] args) {InputStream inputStream = System.in;OutputStream outputStream = System.out;Scanner in = new Scanner(inputStream);PrintWriter out = new PrintWriter(outputStream);TaskA solver = new TaskA();solver.solve(1, in, out);out.close();}static class TaskA {public void solve(int testNumber, Scanner in, PrintWriter out) {int n = in.nextInt();int oddodd = 0;int oddeven = 0;int evenodd = 0;int eveneven = 0;for (int i = 0; i < n; i++) {int x, y;x = in.nextInt();y = in.nextInt();if (x % 2 == 0 && y % 2 == 0) eveneven++;else if (x % 2 == 0 && y % 2 == 1) evenodd++;else if (x % 2 == 1 && y % 2 == 0) oddeven++;else oddodd++;}int cnt = oddodd / 2 + oddeven / 2 + eveneven / 2 + evenodd / 2;if (cnt % 2 == 0) {out.println("Bob");} else out.println("Alice");}}}