結果

問題 No.2024 Xer
ユーザー titiatitia
提出日時 2022-07-30 00:18:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 473 ms / 2,000 ms
コード長 393 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 10,920 KB
実行使用メモリ 42,612 KB
最終ジャッジ日時 2023-09-27 00:38:00
合計ジャッジ時間 9,501 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,796 KB
testcase_01 AC 15 ms
7,836 KB
testcase_02 AC 16 ms
7,784 KB
testcase_03 AC 16 ms
7,796 KB
testcase_04 AC 16 ms
7,800 KB
testcase_05 AC 16 ms
7,916 KB
testcase_06 AC 16 ms
7,764 KB
testcase_07 AC 473 ms
39,400 KB
testcase_08 AC 294 ms
38,072 KB
testcase_09 AC 394 ms
42,412 KB
testcase_10 AC 309 ms
41,320 KB
testcase_11 AC 142 ms
19,088 KB
testcase_12 AC 258 ms
26,660 KB
testcase_13 AC 291 ms
28,120 KB
testcase_14 AC 469 ms
40,564 KB
testcase_15 AC 200 ms
22,224 KB
testcase_16 AC 318 ms
30,192 KB
testcase_17 AC 141 ms
21,460 KB
testcase_18 AC 168 ms
20,192 KB
testcase_19 AC 465 ms
39,912 KB
testcase_20 AC 220 ms
28,020 KB
testcase_21 AC 406 ms
42,408 KB
testcase_22 AC 397 ms
42,464 KB
testcase_23 AC 398 ms
42,612 KB
testcase_24 AC 400 ms
42,412 KB
testcase_25 AC 17 ms
8,308 KB
testcase_26 AC 21 ms
8,824 KB
testcase_27 AC 18 ms
8,340 KB
testcase_28 AC 17 ms
8,260 KB
testcase_29 AC 18 ms
8,432 KB
testcase_30 AC 20 ms
8,716 KB
testcase_31 AC 22 ms
9,012 KB
testcase_32 AC 24 ms
8,964 KB
testcase_33 AC 21 ms
8,716 KB
testcase_34 AC 18 ms
8,268 KB
testcase_35 AC 16 ms
7,800 KB
testcase_36 AC 20 ms
8,756 KB
testcase_37 AC 21 ms
8,720 KB
testcase_38 AC 23 ms
8,932 KB
testcase_39 AC 16 ms
7,796 KB
testcase_40 AC 17 ms
8,188 KB
testcase_41 AC 20 ms
8,508 KB
testcase_42 AC 20 ms
8,664 KB
testcase_43 AC 19 ms
8,392 KB
testcase_44 AC 21 ms
8,776 KB
testcase_45 AC 299 ms
35,200 KB
testcase_46 AC 65 ms
14,140 KB
testcase_47 AC 224 ms
28,380 KB
testcase_48 AC 16 ms
7,756 KB
testcase_49 AC 16 ms
7,732 KB
testcase_50 AC 16 ms
7,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from operator import itemgetter

N,X=map(int,input().split())
A=list(map(int,input().split()))
B=[(min(A[i],A[i]^X),i) for i in range(N)]

B.sort(key=itemgetter(0))

C=[-1]*N

for i in range(N):
    _,ind=B[i]
    C[i]=A[ind]

for i in range(N-1):
    a=C[i]
    b=C[i+1]

    if a>=b^X or a^X>=b:
        print("No")
        break
else:
    print("Yes")
0