結果

問題 No.601 Midpoint Erase
コンテスト
ユーザー bal4u
提出日時 2019-06-23 15:50:56
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 610 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 30,720 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-26 14:02:20
合計ジャッジ時間 1,202 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'in':
main.c:7:14: warning: implicit declaration of function 'getchar_unlocked' [-Wimplicit-function-declaration]
    7 | #define gc() getchar_unlocked()
      |              ^~~~~~~~~~~~~~~~
main.c:14:24: note: in expansion of macro 'gc'
   14 |         int n = 0, c = gc();
      |                        ^~

ソースコード

diff #

// yukicoder: No.601 Midpoint Erase
// 2019.6.23 bal4u

#include <stdio.h>

#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif

int in()    // 非負整数の入力
{
	int n = 0, c = gc();
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}


int cin() {   // 特殊入力
	int n, c;
	while ((c = gc()) >= '0') n = c;
	return n;
}

int a[4];

int main()
{
	int i, x, y, N, ans;

	N = in();
	while (N--) {
		x = cin() & 1, y = cin() & 1;
		a[(x << 1) | y]++;
	}
	ans = 0;
	i = 4; while (i--) {
		if ((a[i] & 3) >= 2) ans = !ans;
	}
	puts(ans? "Alice": "Bob");
	return 0;
}
0