結果
| 問題 | No.706 多眼生物の調査 |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-16 03:28:26 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 2,000 ms |
| コード長 | 578 bytes |
| 記録 | |
| コンパイル時間 | 1,319 ms |
| コンパイル使用メモリ | 30,336 KB |
| 実行使用メモリ | 26,752 KB |
| 最終ジャッジ日時 | 2026-05-11 07:28:01 |
| 合計ジャッジ時間 | 2,099 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 11 MAY 2026 07:27:58 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.039
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((n (read))
(hashmap (make-hash-table))
(max-val 0)
(res 0))
(dotimes (i n)
(let* ((s (read-line))
(len-s (length s)))
(setf (gethash len-s hashmap 0) (+ (gethash len-s hashmap 0) 1))))
(maphash (lambda (key val)
(when (or (> val max-val)
(and (= val max-val) (> key res)))
(setf max-val val
res key)))
hashmap)
(format t "~d~%" (- res 2))))
(main)
Common Lisp