結果

問題 No.2024 Xer
ユーザー titiatitia
提出日時 2022-07-30 00:17:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 412 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,976 KB
実行使用メモリ 42,780 KB
最終ジャッジ日時 2023-09-27 00:37:45
合計ジャッジ時間 10,390 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,776 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 16 ms
7,836 KB
testcase_04 AC 16 ms
7,800 KB
testcase_05 AC 16 ms
7,856 KB
testcase_06 WA -
testcase_07 AC 481 ms
39,436 KB
testcase_08 AC 310 ms
38,108 KB
testcase_09 WA -
testcase_10 AC 311 ms
41,280 KB
testcase_11 AC 144 ms
19,124 KB
testcase_12 AC 260 ms
26,760 KB
testcase_13 AC 285 ms
28,132 KB
testcase_14 AC 478 ms
40,728 KB
testcase_15 AC 203 ms
22,392 KB
testcase_16 AC 323 ms
30,264 KB
testcase_17 WA -
testcase_18 AC 167 ms
20,268 KB
testcase_19 AC 471 ms
40,120 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 20 ms
8,544 KB
testcase_28 AC 17 ms
8,260 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 24 ms
8,792 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 16 ms
7,828 KB
testcase_40 AC 17 ms
8,256 KB
testcase_41 AC 21 ms
8,664 KB
testcase_42 WA -
testcase_43 AC 21 ms
8,560 KB
testcase_44 AC 23 ms
8,764 KB
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 AC 16 ms
7,816 KB
testcase_49 AC 16 ms
7,816 KB
testcase_50 AC 16 ms
7,840 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")
        print(a,b)
        break
else:
    print("Yes")
0