結果
| 問題 |
No.2813 Cookie
|
| コンテスト | |
| ユーザー |
chro_96
|
| 提出日時 | 2024-07-19 22:51:25 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 559 bytes |
| コンパイル時間 | 212 ms |
| コンパイル使用メモリ | 29,312 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 22:51:32 |
| 合計ジャッジ時間 | 1,919 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 4 WA * 26 |
ソースコード
#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-1)/2;
cnt++;
} else {
alt ^= 1;
}
n--;
}
if ((acc > 0 && alt <= 0) || (acc <= 0 && alt > 0) || (cnt <= 0 && alt > 0)) {
printf("Alice\n");
} else {
printf("Bob\n");
}
t--;
}
return 0;
}
chro_96