提出 #70098793


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,A,B) for(int i = A;i<=B;i++)
const int N = 5e5+10;
int a[N];int n;

bool solve(){
	cin>>n;int res = 0,ans = 0;
	rep(i,1,n)cin>>a[i];
	rep(i,1,n){
		res = res|a[i];
		ans = ans^a[i];
	}
	return res==ans;
}
signed main(){
	int t;cin>>t;
	while(t--){
		if(solve()) cout<<"Bob"<<endl;
		else cout<<"Alice"<<endl;
	}
	return 0;
}

提出情報

提出日時
問題 A - Bitwise OR Game
ユーザ huangxintong
言語 C++ 20 (gcc 12.2)
得点 500
コード長 429 Byte
結果 AC
実行時間 155 ms
メモリ 5208 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 500 / 500
結果
AC × 1
AC × 23
セット名 テストケース
Sample 00_sample_00.txt
All 00_sample_00.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt, 01_handmade_07.txt, 01_handmade_08.txt, 01_handmade_09.txt, 02_Bob_00.txt, 02_Bob_01.txt, 02_Bob_02.txt, 02_Bob_03.txt, 02_Bob_04.txt, 02_Bob_05.txt, 02_Bob_06.txt, 02_Bob_07.txt, 02_Bob_08.txt, 03_Alice_00.txt, 03_Alice_01.txt, 03_Alice_02.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3572 KiB
01_handmade_00.txt AC 129 ms 3496 KiB
01_handmade_01.txt AC 155 ms 3464 KiB
01_handmade_02.txt AC 89 ms 3444 KiB
01_handmade_03.txt AC 115 ms 3508 KiB
01_handmade_04.txt AC 155 ms 3456 KiB
01_handmade_05.txt AC 119 ms 3464 KiB
01_handmade_06.txt AC 92 ms 3420 KiB
01_handmade_07.txt AC 50 ms 3508 KiB
01_handmade_08.txt AC 53 ms 5024 KiB
01_handmade_09.txt AC 52 ms 5208 KiB
02_Bob_00.txt AC 53 ms 3576 KiB
02_Bob_01.txt AC 52 ms 3520 KiB
02_Bob_02.txt AC 49 ms 3372 KiB
02_Bob_03.txt AC 49 ms 3456 KiB
02_Bob_04.txt AC 48 ms 5052 KiB
02_Bob_05.txt AC 48 ms 5024 KiB
02_Bob_06.txt AC 49 ms 5020 KiB
02_Bob_07.txt AC 45 ms 4996 KiB
02_Bob_08.txt AC 119 ms 3496 KiB
03_Alice_00.txt AC 52 ms 3512 KiB
03_Alice_01.txt AC 53 ms 3448 KiB
03_Alice_02.txt AC 52 ms 3652 KiB