結果
問題 |
No.183 たのしい排他的論理和(EASY)
|
ユーザー |
![]() |
提出日時 | 2020-01-27 20:37:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 468 ms / 5,000 ms |
コード長 | 525 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 44,584 KB |
最終ジャッジ日時 | 2024-07-02 23:36:55 |
合計ジャッジ時間 | 12,298 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np N = int(readline()) A = np.array(read().split(),np.int32) def row_transform_over_F2(A, highest=60): for k in range(highest, -1, -1): I = np.where((A >> k) == 1)[0] if len(I) == 0: continue i = I[0] x = A[i] A ^= ((A >> k) & 1) * x A[i] = x row_transform_over_F2(A, 15) n = np.count_nonzero(A) answer = 2 ** n print(answer)