結果
| 問題 |
No.11 カードマッチ
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-03 21:53:29 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 5,000 ms |
| コード長 | 495 bytes |
| コンパイル時間 | 458 ms |
| コンパイル使用メモリ | 39,416 KB |
| 実行使用メモリ | 29,988 KB |
| 最終ジャッジ日時 | 2024-11-03 21:53:31 |
| 合計ジャッジ時間 | 1,673 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 03 NOV 2024 09:53:29 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.005
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((w (read))
(h (read))
(n (read))
(s (make-hash-table))
(k (make-hash-table)))
(dotimes (i n)
(let* ((a (read))
(b (read)))
(setf (gethash a s) t)
(setf (gethash b k) t)))
(let* ((cnt-s (hash-table-count s))
(cnt-k (hash-table-count k))
(res (- (+ (* cnt-s h) (* cnt-k w)) (* cnt-s cnt-k) n)))
(format t "~d~%" res))))
(main)
Common Lisp