結果
| 問題 |
No.601 Midpoint Erase
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-17 19:05:12 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 599 bytes |
| コンパイル時間 | 2,439 ms |
| コンパイル使用メモリ | 201,200 KB |
| 最終ジャッジ日時 | 2025-01-11 05:00:43 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 WA * 2 |
ソースコード
#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;
}