結果
問題 |
No.2814 Block Game
|
ユーザー |
![]() |
提出日時 | 2024-07-19 22:45:17 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 475 bytes |
コンパイル時間 | 2,895 ms |
コンパイル使用メモリ | 243,600 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 22:45:24 |
合計ジャッジ時間 | 6,088 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 20 |
ソースコード
#include <bits/stdc++.h> using Int = int64_t; void Solve() { Int n; std::cin >> n; std::string s; std::cin >> s; if (s == "Odd") { std::cout << (std::__has_single_bit(n) && 4 <= n ? "Bob\n" : "Alice\n"); } else { assert(s == "Even"); std::cout << (std::__has_single_bit(n) && n < 4 ? "Bob\n" : "Alice\n"); } } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); Int t; std::cin >> t; while (t--) { Solve(); } }