結果
問題 | No.1072 A Nice XOR Pair |
ユーザー |
![]() |
提出日時 | 2020-06-05 21:35:16 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 180 ms / 2,000 ms |
コード長 | 231 bytes |
コンパイル時間 | 363 ms |
コンパイル使用メモリ | 82,360 KB |
実行使用メモリ | 109,320 KB |
最終ジャッジ日時 | 2024-12-17 13:40:13 |
合計ジャッジ時間 | 2,172 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
ソースコード
n, x = map(int, input().split())A = [int(input()) for _ in range(n)]d = {}ans = 0for i in range(n):if A[i] in d:ans += d[A[i]]if A[i]^x in d:d[A[i]^x] += 1else:d[A[i]^x] = 1print(ans)