結果

問題 No.1072 A Nice XOR Pair
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2022-02-08 00:34:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 992 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 31,688 KB
最終ジャッジ日時 2023-09-04 19:15:25
合計ジャッジ時間 5,206 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,432 KB
testcase_01 AC 19 ms
8,552 KB
testcase_02 AC 19 ms
8,436 KB
testcase_03 AC 19 ms
8,516 KB
testcase_04 WA -
testcase_05 AC 19 ms
8,424 KB
testcase_06 AC 23 ms
8,696 KB
testcase_07 AC 522 ms
31,608 KB
testcase_08 AC 430 ms
16,296 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 500 ms
20,184 KB
testcase_12 AC 497 ms
31,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X = map(int,input().split())
A = [int(input()) for _ in range(N)]
ans = 0
from collections import Counter
c = Counter(A)
for a in A:
    ans += c[a^X]
print(ans//2)
0