結果
| 問題 |
No.2813 Cookie
|
| コンテスト | |
| ユーザー |
chro_96
|
| 提出日時 | 2024-07-20 00:56:37 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 542 bytes |
| コンパイル時間 | 307 ms |
| コンパイル使用メモリ | 29,696 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-20 00:56:43 |
| 合計ジャッジ時間 | 2,031 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 27 |
ソースコード
#include <stdio.h>
int main () {
int t = 0;
int n = 0;
int a[200000] = {};
int res = 0;
res = scanf("%d", &t);
while (t > 0) {
int max = 0;
int cnt = 0;
res = scanf("%d", &n);
for (int i = 0; i < n; i++) {
res = scanf("%d", a+i);
if (a[i] > max) {
max = a[i];
}
}
for (int i = 0; i < n; i++) {
if (a[i] >= max-1+max%2) {
cnt++;
}
}
if (cnt%2 > 0) {
printf("Alice\n");
} else {
printf("Bob\n");
}
t--;
}
return 0;
}
chro_96