結果

問題 No.69 文字を自由に並び替え
コンテスト
ユーザー mikan-water
提出日時 2024-01-14 11:04:54
言語 Common Lisp
(sbcl 2.6.3)
コンパイル:
sbclc _filename_
実行:
sbcl --script Main.fasl
結果
AC  
実行時間 6 ms / 5,000 ms
コード長 422 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 525 ms
コンパイル使用メモリ 29,056 KB
実行使用メモリ 22,144 KB
最終ジャッジ日時 2026-04-14 18:55:22
合計ジャッジ時間 1,194 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 14 APR 2026 06:55:18 PM):

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.013

ソースコード

diff #
raw source code

; variables
(defparameter *str_a* "")
(defparameter *str_b* "")

; functions
(defun input-strings ()
  (setf *str_a* (read-line))
  (setf *str_b* (read-line))
)

(defun check-same-str-p (str1 str2)
  (equal
    (sort (coerce str1 'list) #'char-lessp)
    (sort (coerce str2 'list) #'char-lessp))
)

(defun n69 ()
  (input-strings)
  (if (check-same-str-p *str_a* *str_b*)
    (princ "YES")
    (princ "NO")
    )
)

(n69)
0