結果

問題 No.601 Midpoint Erase
ユーザー evawenisevawenis
提出日時 2020-06-17 19:05:12
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 599 bytes
コンパイル時間 2,179 ms
コンパイル使用メモリ 208,504 KB
実行使用メモリ 7,884 KB
最終ジャッジ日時 2023-09-16 11:35:09
合計ジャッジ時間 4,665 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 40 ms
6,308 KB
testcase_04 AC 47 ms
6,620 KB
testcase_05 AC 31 ms
5,740 KB
testcase_06 AC 16 ms
4,696 KB
testcase_07 AC 42 ms
6,480 KB
testcase_08 AC 36 ms
6,000 KB
testcase_09 AC 45 ms
6,628 KB
testcase_10 AC 9 ms
4,376 KB
testcase_11 AC 68 ms
7,884 KB
testcase_12 AC 27 ms
5,628 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 WA -
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 1 ms
4,376 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n; cin>>n;
	vector<set<pair<int,int>>>st(4);
	for(int i=0;i<n;++i){
		int x,y; cin>>x>>y;
		if(x&1){
			if(y&1)st.at(0).insert({x,y});
			else st.at(1).insert({x,y});
		}
		else if(y&1)st.at(2).insert({x,y});
		else st.at(3).insert({x,y});
	}
	int ans=0;
	out:{}
	for(auto&&i:st){
		for(auto&&j:i){
			for(auto&&k:i){
				if(abs(j.first-k.first)>1&&abs(j.second-k.second)>1){
					++ans;
					i.erase(j);
					i.erase(k);
					goto out;
				}
			}
		}
	}
	cout<<(ans&1?"Alice"s:"Bob"s)<<"\n"s;
}
0