結果
問題 |
No.2813 Cookie
|
ユーザー |
![]() |
提出日時 | 2024-07-19 22:43:54 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 518 bytes |
コンパイル時間 | 153 ms |
コンパイル使用メモリ | 28,800 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 22:44:08 |
合計ジャッジ時間 | 1,896 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 WA * 25 |
ソースコード
#include <stdio.h> int main () { int t = 0; int n = 0; int a = 0; int res = 0; res = scanf("%d", &t); while (t > 0) { int acc = 0; int cnt = 0; int alt = 0; res = scanf("%d", &n); while (n > 0) { res = scanf("%d", &a); if (a > 2) { acc ^= (a-2); cnt++; } else { alt ^= 1; } n--; } if (acc > 0 || (cnt <= 0 && alt > 0)) { printf("Alice\n"); } else { printf("Bob\n"); } t--; } return 0; }