結果
| 問題 |
No.1072 A Nice XOR Pair
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-06-05 22:25:38 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 317 ms / 2,000 ms |
| コード長 | 304 bytes |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 38,920 KB |
| 最終ジャッジ日時 | 2024-12-17 16:09:25 |
| 合計ジャッジ時間 | 2,527 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
ソースコード
import sys
from collections import defaultdict
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, X, *A = map(int, read().split())
answer = 0
counter = defaultdict(int)
for x in A:
answer += counter[x ^ X]
counter[x] += 1
print(answer)
maspy