結果

問題 No.69 文字を自由に並び替え
ユーザー mikan-watermikan-water
提出日時 2024-01-14 11:04:54
言語 Common Lisp
(sbcl 2.3.8)
結果
AC  
実行時間 9 ms / 5,000 ms
コード長 422 bytes
コンパイル時間 1,176 ms
コンパイル使用メモリ 36,672 KB
実行使用メモリ 29,344 KB
最終ジャッジ日時 2024-01-14 11:04:56
合計ジャッジ時間 1,634 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
29,344 KB
testcase_01 AC 8 ms
29,344 KB
testcase_02 AC 7 ms
29,344 KB
testcase_03 AC 8 ms
29,344 KB
testcase_04 AC 8 ms
29,344 KB
testcase_05 AC 8 ms
29,344 KB
testcase_06 AC 9 ms
29,344 KB
testcase_07 AC 8 ms
29,344 KB
testcase_08 AC 8 ms
29,344 KB
testcase_09 AC 8 ms
29,344 KB
testcase_10 AC 8 ms
29,344 KB
testcase_11 AC 8 ms
29,344 KB
testcase_12 AC 7 ms
29,344 KB
testcase_13 AC 8 ms
29,344 KB
testcase_14 AC 8 ms
29,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 14 JAN 2024 02:04:54 AM):

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

ソースコード

diff #

; 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