結果
| 問題 | No.2737 Compound Word |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-23 01:53:07 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 2,000 ms |
| コード長 | 559 bytes |
| 記録 | |
| コンパイル時間 | 204 ms |
| コンパイル使用メモリ | 30,208 KB |
| 実行使用メモリ | 22,400 KB |
| 最終ジャッジ日時 | 2026-05-02 13:43:34 |
| 合計ジャッジ時間 | 2,183 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 27 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 02 MAY 2026 01:43:30 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.005
ソースコード
(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)