結果

問題 No.1072 A Nice XOR Pair
ユーザー anagohirame
提出日時 2020-06-05 21:35:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 366 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 31,644 KB
最終ジャッジ日時 2024-12-17 13:41:25
合計ジャッジ時間 2,920 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
import sys
def input():
	return sys.stdin.buffer.readline()[:-1]

n, x = map(int, input().split())
c = Counter()
ans = 0
for _ in range(n):
	a = int(input())
	ans += c[a^x]
	c[a] += 1
print(ans)
0