結果

問題 No.601 Midpoint Erase
ユーザー aaa
提出日時 2018-11-08 20:23:02
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 984 bytes
コンパイル時間 923 ms
コンパイル使用メモリ 99,640 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-20 21:09:04
合計ジャッジ時間 3,176 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>
#include <sstream>

using namespace std;


int main(){
	int i, j, k;
	int n;
	vector<vector<int>>list(4, vector<int>(1, 0));

	cin >> n;

	for (i = 0; i < n; i++) {
		int num1, num2;
		cin >> num1 >> num2;

		if (num1 % 2 == 0 && num2 % 2 == 0) {
			list[0][0]++;
		}
		else if (num1 % 2 == 0 && num2 % 2 == 1) {
			list[1][0]++;
		}
		else if (num1 % 2 == 1 && num2 % 2 == 0) {
			list[2][0]++;
		}
		else if (num1 % 2 == 1 && num2 % 2 == 1) {
			list[3][0]++;
		}

	}

	int sum = 0;

	for (i = 0; i < 4; i++) {
		sum += (list[i][0] / 2);
	}


	if (sum % 2 == 1) {
		cout << "Alice" << endl;
	}
	else {
		cout << "Bob" << endl;
	}





	getchar();
	getchar();
	return 0;
}
0