結果
問題 | No.706 多眼生物の調査 |
ユーザー |
![]() |
提出日時 | 2024-11-16 03:28:26 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
AC
|
実行時間 | 23 ms / 2,000 ms |
コード長 | 578 bytes |
コンパイル時間 | 172 ms |
コンパイル使用メモリ | 37,520 KB |
実行使用メモリ | 34,840 KB |
最終ジャッジ日時 | 2024-11-16 03:28:41 |
合計ジャッジ時間 | 812 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 16 NOV 2024 03:28:39 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.022
ソースコード
(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 valres key)))hashmap)(format t "~d~%" (- res 2))))(main)