結果

問題 No.2024 Xer
ユーザー ikomaikoma
提出日時 2022-07-29 23:38:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 383 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 86,872 KB
実行使用メモリ 149,092 KB
最終ジャッジ日時 2023-09-26 23:28:55
合計ジャッジ時間 26,296 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
71,976 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 107 ms
72,196 KB
testcase_04 AC 110 ms
72,072 KB
testcase_05 AC 108 ms
71,860 KB
testcase_06 WA -
testcase_07 AC 1,379 ms
144,132 KB
testcase_08 AC 273 ms
149,036 KB
testcase_09 WA -
testcase_10 AC 284 ms
149,092 KB
testcase_11 AC 464 ms
99,992 KB
testcase_12 AC 771 ms
111,132 KB
testcase_13 AC 843 ms
116,616 KB
testcase_14 AC 1,372 ms
148,764 KB
testcase_15 AC 601 ms
106,380 KB
testcase_16 AC 932 ms
120,464 KB
testcase_17 WA -
testcase_18 AC 538 ms
103,360 KB
testcase_19 AC 1,349 ms
148,840 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 135 ms
79,116 KB
testcase_28 AC 122 ms
77,280 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 140 ms
78,400 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 113 ms
76,588 KB
testcase_40 AC 126 ms
77,296 KB
testcase_41 AC 136 ms
78,952 KB
testcase_42 WA -
testcase_43 AC 136 ms
79,060 KB
testcase_44 AC 138 ms
78,380 KB
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 AC 109 ms
72,312 KB
testcase_49 AC 109 ms
71,852 KB
testcase_50 AC 107 ms
72,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N,X=map(int,input().split())
A=list(map(int,input().split()))

from functools import cmp_to_key
def cmp(a,b):
    return -1 if min(a,a^X)<min(b,b^X) else 1

As = sorted(A, key=cmp_to_key(cmp))
ng=0
for i in range(1,N):
    if As[i-1]^X >= As[i]:
        ng=1
        print(i,As[i-1]^X , As[i])
print("Yes" if ng==0 and len(set(A))==N else "No")
0