結果
| 問題 |
No.2813 Cookie
|
| コンテスト | |
| ユーザー |
chro_96
|
| 提出日時 | 2024-07-19 22:35:09 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 516 bytes |
| コンパイル時間 | 1,223 ms |
| コンパイル使用メモリ | 28,544 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 22:35:12 |
| 合計ジャッジ時間 | 3,273 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;
}
chro_96