結果
問題 | No.1072 A Nice XOR Pair |
ユーザー |
![]() |
提出日時 | 2020-06-05 21:38:23 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 304 ms / 2,000 ms |
コード長 | 260 bytes |
コンパイル時間 | 106 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 33,964 KB |
最終ジャッジ日時 | 2024-12-17 13:46:14 |
合計ジャッジ時間 | 2,729 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
ソースコード
from collections import Counterimport sysinput = sys.stdin.buffer.readlinesys.setrecursionlimit(10 ** 7)N, X = map(int, input().split())A = [int(input()) for _ in range(N)]C = Counter(A)ans = 0for a in A:C[a] -= 1ans += C[a ^ X]print(ans)