結果
| 問題 | No.3752 No Use Crying Over Suffixes |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-11 10:39:50 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 635 bytes |
| 記録 | |
| コンパイル時間 | 352 ms |
| コンパイル使用メモリ | 91,760 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-10-02 20:55:32 |
| 合計ジャッジ時間 | 2,492 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 35 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
void solve() {
int N;
cin >> N;
vector<long long> A(N);
for (int i = 0; i < N; ++i) {
cin >> A[i];
}
long long xor_sum = 0;
// 右から奇数番目の山 (インデックスは 0-indexed で N-1, N-3, N-5, ...)
for (int i = N - 1; i >= 0; i -= 2) {
xor_sum ^= A[i];
}
if (xor_sum != 0) {
cout << "Alice\n";
} else {
cout << "Bob\n";
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int T;
cin >> T;
while (T--) {
solve();
}
return 0;
}