結果

問題 No.2024 Xer
ユーザー shotoyooshotoyoo
提出日時 2023-08-01 23:10:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 336 ms / 2,000 ms
コード長 940 bytes
コンパイル時間 561 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 151,180 KB
最終ジャッジ日時 2024-04-20 00:00:28
合計ジャッジ時間 7,481 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,888 KB
testcase_01 AC 38 ms
53,760 KB
testcase_02 AC 39 ms
54,016 KB
testcase_03 AC 40 ms
54,016 KB
testcase_04 AC 41 ms
53,632 KB
testcase_05 AC 39 ms
53,632 KB
testcase_06 AC 39 ms
53,632 KB
testcase_07 AC 320 ms
120,064 KB
testcase_08 AC 159 ms
150,764 KB
testcase_09 AC 115 ms
114,028 KB
testcase_10 AC 163 ms
150,476 KB
testcase_11 AC 131 ms
99,200 KB
testcase_12 AC 195 ms
119,168 KB
testcase_13 AC 210 ms
123,776 KB
testcase_14 AC 328 ms
150,896 KB
testcase_15 AC 177 ms
111,104 KB
testcase_16 AC 228 ms
107,648 KB
testcase_17 AC 81 ms
97,408 KB
testcase_18 AC 165 ms
107,904 KB
testcase_19 AC 336 ms
151,180 KB
testcase_20 AC 90 ms
113,408 KB
testcase_21 AC 140 ms
144,096 KB
testcase_22 AC 139 ms
143,824 KB
testcase_23 AC 141 ms
143,964 KB
testcase_24 AC 149 ms
144,088 KB
testcase_25 AC 42 ms
54,912 KB
testcase_26 AC 45 ms
62,720 KB
testcase_27 AC 50 ms
64,000 KB
testcase_28 AC 41 ms
54,912 KB
testcase_29 AC 46 ms
62,720 KB
testcase_30 AC 44 ms
62,592 KB
testcase_31 AC 44 ms
63,232 KB
testcase_32 AC 51 ms
65,664 KB
testcase_33 AC 43 ms
62,080 KB
testcase_34 AC 39 ms
54,784 KB
testcase_35 AC 39 ms
54,016 KB
testcase_36 AC 44 ms
61,952 KB
testcase_37 AC 52 ms
63,872 KB
testcase_38 AC 46 ms
62,848 KB
testcase_39 AC 38 ms
54,400 KB
testcase_40 AC 40 ms
54,912 KB
testcase_41 AC 50 ms
64,512 KB
testcase_42 AC 43 ms
62,208 KB
testcase_43 AC 49 ms
64,384 KB
testcase_44 AC 49 ms
65,152 KB
testcase_45 AC 90 ms
101,504 KB
testcase_46 AC 51 ms
71,808 KB
testcase_47 AC 76 ms
100,096 KB
testcase_48 AC 38 ms
53,888 KB
testcase_49 AC 36 ms
53,888 KB
testcase_50 AC 38 ms
54,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, random
input = lambda : sys.stdin.readline().rstrip()


write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x))
debug = lambda x: sys.stderr.write(x+"\n")
YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO); INF=10**18
LI = lambda : list(map(int, input().split())); II=lambda : int(input()); SI=lambda : [ord(c)-ord("a") for c in input()]
def debug(_l_):
    for s in _l_.split():
        print(f"{s}={eval(s)}", end=" ")
    print()
def dlist(*l, fill=0):
    if len(l)==1:
        return [fill]*l[0]
    ll = l[1:]
    return [dlist(*ll, fill=fill) for _ in range(l[0])]

n,x = list(map(int, input().split()))
a = LI()
na = []
for v in a:
    tmp = (~x)&v
    na.append(tmp)
if len(set(na))<n:
    ans = 0
else:
    index = list(range(n))
    index.sort(key=lambda i: na[i])
    a = [a[i] for i in index]
    ans = all((a[i]<a[i+1]^x and a[i]^x<a[i+1] for i in range(n-1)))
pans(ans)
0