結果

問題 No.1072 A Nice XOR Pair
ユーザー d9et
提出日時 2020-06-05 21:27:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 255 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 102,980 KB
最終ジャッジ日時 2024-12-17 13:22:01
合計ジャッジ時間 2,533 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
dc = defaultdict(int)
n,x = map(int,input().split())
ans = 0
for i in range(n):
    a = int(input())
    y = x^a
    ans += dc[y]
    dc[a] += 1
print(ans)
0