結果
| 問題 |
No.1072 A Nice XOR Pair
|
| コンテスト | |
| ユーザー |
ryo_n
|
| 提出日時 | 2020-06-05 21:30:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 356 bytes |
| コンパイル時間 | 491 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 34,072 KB |
| 最終ジャッジ日時 | 2024-12-17 13:29:02 |
| 合計ジャッジ時間 | 2,174 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 WA * 3 |
ソースコード
import sys
import collections
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
def main():
N, X = [int(x) for x in input().split()]
A = [int(input()) for _ in range(N)]
c = collections.Counter(A)
ans = 0
for a in A:
ans += c[a ^ X]
print(ans // 2)
if __name__ == '__main__':
main()
ryo_n