結果

問題 No.601 Midpoint Erase
ユーザー tnk123456tnk123456
提出日時 2017-12-05 19:28:18
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 838 bytes
コンパイル時間 529 ms
コンパイル使用メモリ 58,104 KB
実行使用メモリ 4,868 KB
最終ジャッジ日時 2023-08-24 18:47:29
合計ジャッジ時間 2,231 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 47 ms
4,412 KB
testcase_04 AC 52 ms
4,440 KB
testcase_05 AC 37 ms
4,380 KB
testcase_06 AC 22 ms
4,376 KB
testcase_07 AC 49 ms
4,440 KB
testcase_08 AC 42 ms
4,376 KB
testcase_09 AC 50 ms
4,396 KB
testcase_10 AC 12 ms
4,380 KB
testcase_11 AC 70 ms
4,868 KB
testcase_12 AC 32 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>

using namespace std;


typedef unsigned long long ull;
const ull NMAX = 1000000;
ull N;


typedef struct point{
	ull  x ;
	ull  y ;
}point;

point A[NMAX];

int main(void){
	
	cin >> N;
	
	for(int j = 0 ; j < N; j++){
		cin >> A[j].x ;
		cin >> A[j].y ;
	}
	
	int eo = 0;
	int oe = 0;
	int ee = 0;
	int oo = 0;
	int m = 0;
	
//	cout << eo << endl;
	
	for(int i = 0; i < N; i++){
		if((A[i].x % 2 == 0) && (A[i].y % 2 !=0)) eo++ ;
		if (A[i].x % 2 != 0 && A[i].y % 2 == 0) oe++ ;
		if (A[i].x % 2 == 0 && A[i].y % 2 == 0) ee++ ;
		if (A[i].x % 2 != 0 && A[i].y % 2 != 0) oo++ ; 
	}
//	cout << eo << endl;
//	cout << oe << endl;
//	cout << ee << endl;
//	cout << oo << endl; 
	
	m = eo/2 + oe/2 + ee/2 + oo/2 ;
	if(m % 2 == 0) cout << "Bob" << endl;
	else cout << "Alice" << endl;
	
	
	
	
	return 0;}
0