結果

問題 No.2024 Xer
ユーザー ikomaikoma
提出日時 2022-07-29 23:41:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,376 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 149,300 KB
最終ジャッジ日時 2023-09-26 23:33:43
合計ジャッジ時間 25,475 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
72,028 KB
testcase_01 AC 106 ms
72,136 KB
testcase_02 AC 106 ms
72,280 KB
testcase_03 AC 106 ms
72,260 KB
testcase_04 AC 106 ms
72,228 KB
testcase_05 AC 104 ms
72,272 KB
testcase_06 AC 105 ms
72,044 KB
testcase_07 AC 1,357 ms
144,060 KB
testcase_08 AC 274 ms
149,300 KB
testcase_09 AC 1,351 ms
119,560 KB
testcase_10 AC 279 ms
148,896 KB
testcase_11 AC 460 ms
99,668 KB
testcase_12 AC 747 ms
111,212 KB
testcase_13 AC 832 ms
116,760 KB
testcase_14 AC 1,333 ms
149,172 KB
testcase_15 AC 608 ms
106,336 KB
testcase_16 AC 925 ms
120,728 KB
testcase_17 AC 544 ms
92,648 KB
testcase_18 AC 532 ms
103,108 KB
testcase_19 AC 1,321 ms
149,160 KB
testcase_20 AC 789 ms
96,452 KB
testcase_21 AC 1,360 ms
120,208 KB
testcase_22 AC 1,357 ms
120,424 KB
testcase_23 AC 1,376 ms
119,648 KB
testcase_24 AC 1,360 ms
119,928 KB
testcase_25 AC 123 ms
77,088 KB
testcase_26 AC 140 ms
78,720 KB
testcase_27 AC 135 ms
78,980 KB
testcase_28 AC 121 ms
76,896 KB
testcase_29 AC 133 ms
78,732 KB
testcase_30 AC 141 ms
79,164 KB
testcase_31 AC 143 ms
78,808 KB
testcase_32 AC 142 ms
78,760 KB
testcase_33 AC 138 ms
78,916 KB
testcase_34 AC 125 ms
77,168 KB
testcase_35 AC 106 ms
72,236 KB
testcase_36 AC 139 ms
78,816 KB
testcase_37 AC 141 ms
78,468 KB
testcase_38 AC 141 ms
79,060 KB
testcase_39 AC 111 ms
76,820 KB
testcase_40 AC 122 ms
77,260 KB
testcase_41 AC 131 ms
78,864 KB
testcase_42 AC 138 ms
79,000 KB
testcase_43 AC 134 ms
78,968 KB
testcase_44 AC 143 ms
78,580 KB
testcase_45 AC 1,063 ms
106,340 KB
testcase_46 AC 298 ms
86,284 KB
testcase_47 AC 828 ms
97,904 KB
testcase_48 AC 106 ms
72,268 KB
testcase_49 AC 105 ms
72,392 KB
testcase_50 AC 107 ms
72,244 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] or As[i-1] >= As[i]^X:
        ng=1
print("Yes" if ng==0 and len(set(A))==N else "No")
0