結果
問題 | No.601 Midpoint Erase |
ユーザー |
![]() |
提出日時 | 2017-12-03 12:51:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 87 ms / 2,000 ms |
コード長 | 677 bytes |
コンパイル時間 | 984 ms |
コンパイル使用メモリ | 81,156 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 03:29:02 |
合計ジャッジ時間 | 2,654 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
#include <iostream>#include <string>#include <vector>#include <algorithm>#include <map>#include <stack>#include <cmath>#include <queue>#include <numeric>int main(){int n;int oo, ee, oe, eo; // o=奇数, e=偶数std::cin >> n;oo = ee = oe = eo = 0;for (size_t i = 0; i < n; i++){int a, b;std::cin >> a >> b;if (a % 2 == 0) {if (b % 2 == 0) {ee++;}else {eo++;}}else {if (b % 2 == 0) {oe++;}else {oo++;}}}int total = oo / 2 + ee / 2 + oe / 2 + eo / 2;if (total % 2 == 0) {std::cout << "Bob" << std::endl;}else {std::cout << "Alice" << std::endl;}return 0;}