結果
問題 |
No.184 たのしい排他的論理和(HARD)
|
ユーザー |
![]() |
提出日時 | 2015-07-22 00:33:04 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 337 bytes |
コンパイル時間 | 127 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 25,504 KB |
最終ジャッジ日時 | 2024-07-04 12:00:24 |
合計ジャッジ時間 | 7,687 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 2 WA * 3 TLE * 1 -- * 28 |
ソースコード
def solve(): N = int(input()) A = list(map(int, input().split())) for i in range(N): a = A[i] if a: for j in range(i + 1, N): if A[j] & a == a: A[j] ^= a print(1 << sum(1 for a in A if a)) def main(): solve() if __name__ == '__main__': main()