結果

問題 No.1072 A Nice XOR Pair
ユーザー FukumotoFukumoto
提出日時 2020-06-08 11:35:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 572 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,600 KB
実行使用メモリ 29,412 KB
最終ジャッジ日時 2023-08-26 06:09:01
合計ジャッジ時間 4,901 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,440 KB
testcase_01 AC 16 ms
8,508 KB
testcase_02 AC 16 ms
8,556 KB
testcase_03 AC 15 ms
8,484 KB
testcase_04 AC 16 ms
8,412 KB
testcase_05 AC 16 ms
8,520 KB
testcase_06 AC 21 ms
8,564 KB
testcase_07 AC 572 ms
29,352 KB
testcase_08 AC 462 ms
8,428 KB
testcase_09 AC 464 ms
8,560 KB
testcase_10 AC 475 ms
8,412 KB
testcase_11 AC 541 ms
13,824 KB
testcase_12 AC 550 ms
29,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

N, X = list(map(int, input().split()))
cnt = Counter()
ans = 0
for i in range(N):
    a = int(input())
    ans += cnt[a]
    cnt[a^X] += 1
print(ans)
0