結果
問題 | No.601 Midpoint Erase |
ユーザー |
|
提出日時 | 2024-11-22 00:02:12 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 698 bytes |
コンパイル時間 | 3,602 ms |
コンパイル使用メモリ | 247,284 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-22 00:02:18 |
合計ジャッジ時間 | 4,768 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll = long long;#define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i)#define all(a) (a).begin(), (a).end()int main() {cin.tie(nullptr);std::ios_base::sync_with_stdio(false);int N;cin >> N;vector<int> cnt(4, 0);rep(i, 0, N) {int x, y;cin >> x >> y;x %= 2, y %= 2;if (x == 0 && y == 0) cnt[0]++;else if (x == 1 && y == 0) cnt[1]++;else if (x == 0 && y == 1) cnt[2]++;else cnt[3]++;}int sum = 0;rep(i, 0, 4) sum += cnt[i] / 2;if (sum % 2 == 0) cout << "Bob\n";else cout << "Alice\n";}