結果
| 問題 |
No.2672 Subset Xor Sum
|
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2024-03-19 14:38:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 152 ms / 2,000 ms |
| コード長 | 357 bytes |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 82,564 KB |
| 実行使用メモリ | 142,456 KB |
| 最終ジャッジ日時 | 2024-09-30 05:29:27 |
| 合計ジャッジ時間 | 5,982 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 66 |
ソースコード
def bit_count(n):
re=0
while n>0:
if n&1:
re+=1
n>>=1
return re
N=int(input())
A=list(map(int,input().split()))
ans=0
for i in range(N):
ans^=A[i]
if ans==0:
left=0
for i in range(N):
left|=A[i]
if N>bit_count(left)+1:
print('Yes')
else:
print('No')
else:
print('No')
nikoro256