結果

問題 No.2024 Xer
ユーザー 👑 tamatotamato
提出日時 2022-07-29 22:04:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 353 ms / 2,000 ms
コード長 549 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 115,912 KB
最終ジャッジ日時 2023-09-26 21:02:52
合計ジャッジ時間 9,595 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,220 KB
testcase_01 AC 63 ms
71,428 KB
testcase_02 AC 65 ms
71,376 KB
testcase_03 AC 64 ms
71,368 KB
testcase_04 AC 66 ms
71,372 KB
testcase_05 AC 70 ms
71,464 KB
testcase_06 AC 66 ms
71,236 KB
testcase_07 AC 317 ms
105,880 KB
testcase_08 AC 140 ms
113,956 KB
testcase_09 AC 316 ms
115,284 KB
testcase_10 AC 145 ms
114,064 KB
testcase_11 AC 142 ms
92,660 KB
testcase_12 AC 189 ms
98,160 KB
testcase_13 AC 208 ms
96,712 KB
testcase_14 AC 310 ms
114,924 KB
testcase_15 AC 177 ms
96,960 KB
testcase_16 AC 222 ms
97,484 KB
testcase_17 AC 167 ms
95,092 KB
testcase_18 AC 165 ms
95,708 KB
testcase_19 AC 312 ms
115,200 KB
testcase_20 AC 200 ms
95,944 KB
testcase_21 AC 322 ms
115,912 KB
testcase_22 AC 312 ms
115,824 KB
testcase_23 AC 318 ms
115,544 KB
testcase_24 AC 353 ms
115,488 KB
testcase_25 AC 73 ms
71,332 KB
testcase_26 AC 74 ms
76,712 KB
testcase_27 AC 75 ms
76,700 KB
testcase_28 AC 68 ms
71,424 KB
testcase_29 AC 73 ms
76,744 KB
testcase_30 AC 74 ms
76,736 KB
testcase_31 AC 81 ms
76,680 KB
testcase_32 AC 78 ms
76,716 KB
testcase_33 AC 74 ms
76,704 KB
testcase_34 AC 67 ms
71,504 KB
testcase_35 AC 68 ms
71,332 KB
testcase_36 AC 76 ms
76,708 KB
testcase_37 AC 77 ms
76,468 KB
testcase_38 AC 78 ms
76,456 KB
testcase_39 AC 68 ms
71,424 KB
testcase_40 AC 66 ms
71,264 KB
testcase_41 AC 75 ms
76,648 KB
testcase_42 AC 74 ms
76,680 KB
testcase_43 AC 73 ms
76,456 KB
testcase_44 AC 75 ms
76,648 KB
testcase_45 AC 255 ms
100,360 KB
testcase_46 AC 106 ms
81,544 KB
testcase_47 AC 203 ms
95,112 KB
testcase_48 AC 65 ms
71,200 KB
testcase_49 AC 65 ms
71,232 KB
testcase_50 AC 63 ms
71,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    import sys
    input = sys.stdin.readline

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

    val = []
    for i, a in enumerate(A):
        b = a ^ X
        val.append((min((a << 30) + b, (b << 30) + a), i))
    val.sort(key=lambda y: y[0])

    a_prev = b_prev = -1
    for _, i in val:
        a = A[i]
        b = a ^ X
        if a <= b_prev or b <= a_prev:
            print("No")
            exit()
        a_prev = a
        b_prev = b
    print("Yes")


if __name__ == '__main__':
    main()
0