結果

問題 No.1072 A Nice XOR Pair
ユーザー umashi-pan-tnokk093n
提出日時 2020-06-06 12:39:23
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 251 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 30,820 KB
最終ジャッジ日時 2024-12-23 12:11:18
合計ジャッジ時間 19,443 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5 TLE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

n,x=map(int,input().split())
a=[]
for i in range(n):
    num=int(input())
    a.append(num)

a.sort()
ans=0
for i in range(n):
    m=x^a[i]
    if m not in a[i+1:]:
        continue
    for j in a[i+1:]:
        if m==j:
            ans+=1
print(ans)
0