結果

問題 No.2737 Compound Word
コンテスト
ユーザー NixOS_and_Gentoo
提出日時 2024-04-23 01:53:07
言語 Common Lisp
(sbcl 2.6.7)
コンパイル:
sbclc _filename_
実行:
sbcl --script Main.fasl
結果
AC  
実行時間 54 ms / 2,000 ms
+ 479µs
コード長 559 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 244 ms
コンパイル使用メモリ 28,800 KB
実行使用メモリ 19,968 KB
最終ジャッジ日時 2026-09-17 12:43:03
合計ジャッジ時間 2,391 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 17 SEP 2026 12:42:59 PM):

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

ソースコード

diff #
raw source code

(defun count-unique-concatenations (string-list)
  (let ((result '()))
    (loop for i from 0 below (length string-list) do
      (loop for j from 0 below (length string-list) do
        (when (not (= i j))
          (let ((combined (concatenate 'string (nth i string-list) (nth j string-list))))
            (pushnew combined result :test 'equal)))))
    (length result)))

(defun main ()
  (let ((n (read)))
    (let ((string-list (loop for i from 0 below n collect (read-line))))
      (format t "~d~%" (count-unique-concatenations string-list)))))

(main)
0