結果
問題 |
No.2024 Xer
|
ユーザー |
|
提出日時 | 2024-09-29 20:30:33 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 586 bytes |
コンパイル時間 | 225 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 40,224 KB |
最終ジャッジ日時 | 2024-09-29 20:31:03 |
合計ジャッジ時間 | 20,382 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 35 WA * 12 |
ソースコード
(use scheme.sort) (define yuki2024 (let* ((n (read)) (x (read)) (an (make-vector n)) (k<? (lambda (px py) (< (+ px (logxor px x)) (+ py (logxor py x)))))) (dotimes (i n) (vector-set! an i (read))) (vector-sort! k<? an) (let loop ((flag #t) (i 0)) (if (= i (- n 1)) (display (if flag "Yes\n" "No\n")) (cond ((>= (vector-ref an i) (logxor (vector-ref an (+ i 1)) x)) (loop #f (+ i 1))) ((<= (vector-ref an (+ i 1)) (logxor (vector-ref an i) x)) (loop #f (+ i 1))) (else (loop #t (+ i 1))))))))