結果
問題 | No.2701 A cans -> B cans |
ユーザー | Common Lisp |
提出日時 | 2024-11-13 00:12:54 |
言語 | Common Lisp (sbcl 2.3.8) |
結果 |
AC
|
実行時間 | 430 ms / 1,000 ms |
コード長 | 788 bytes |
コンパイル時間 | 481 ms |
コンパイル使用メモリ | 35,620 KB |
実行使用メモリ | 22,144 KB |
最終ジャッジ日時 | 2024-11-13 00:13:15 |
合計ジャッジ時間 | 21,248 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 8 ms
21,760 KB |
testcase_01 | AC | 8 ms
21,888 KB |
testcase_02 | AC | 9 ms
21,888 KB |
testcase_03 | AC | 8 ms
21,888 KB |
testcase_04 | AC | 8 ms
21,760 KB |
testcase_05 | AC | 8 ms
21,760 KB |
testcase_06 | AC | 58 ms
22,016 KB |
testcase_07 | AC | 56 ms
21,888 KB |
testcase_08 | AC | 58 ms
22,144 KB |
testcase_09 | AC | 56 ms
22,016 KB |
testcase_10 | AC | 58 ms
22,016 KB |
testcase_11 | AC | 56 ms
22,016 KB |
testcase_12 | AC | 56 ms
22,016 KB |
testcase_13 | AC | 57 ms
21,760 KB |
testcase_14 | AC | 57 ms
21,888 KB |
testcase_15 | AC | 58 ms
22,016 KB |
testcase_16 | AC | 57 ms
21,888 KB |
testcase_17 | AC | 56 ms
22,016 KB |
testcase_18 | AC | 56 ms
22,016 KB |
testcase_19 | AC | 56 ms
22,016 KB |
testcase_20 | AC | 56 ms
22,016 KB |
testcase_21 | AC | 57 ms
21,888 KB |
testcase_22 | AC | 56 ms
22,016 KB |
testcase_23 | AC | 56 ms
22,016 KB |
testcase_24 | AC | 56 ms
21,888 KB |
testcase_25 | AC | 56 ms
22,016 KB |
testcase_26 | AC | 340 ms
22,016 KB |
testcase_27 | AC | 359 ms
22,016 KB |
testcase_28 | AC | 342 ms
22,016 KB |
testcase_29 | AC | 347 ms
22,016 KB |
testcase_30 | AC | 371 ms
21,888 KB |
testcase_31 | AC | 348 ms
22,016 KB |
testcase_32 | AC | 346 ms
21,888 KB |
testcase_33 | AC | 345 ms
22,016 KB |
testcase_34 | AC | 355 ms
22,016 KB |
testcase_35 | AC | 356 ms
22,016 KB |
testcase_36 | AC | 348 ms
22,016 KB |
testcase_37 | AC | 379 ms
21,760 KB |
testcase_38 | AC | 347 ms
22,016 KB |
testcase_39 | AC | 349 ms
21,888 KB |
testcase_40 | AC | 373 ms
22,016 KB |
testcase_41 | AC | 343 ms
22,016 KB |
testcase_42 | AC | 348 ms
22,016 KB |
testcase_43 | AC | 341 ms
22,016 KB |
testcase_44 | AC | 352 ms
22,016 KB |
testcase_45 | AC | 348 ms
21,888 KB |
testcase_46 | AC | 348 ms
22,016 KB |
testcase_47 | AC | 376 ms
22,016 KB |
testcase_48 | AC | 348 ms
21,888 KB |
testcase_49 | AC | 346 ms
21,888 KB |
testcase_50 | AC | 373 ms
21,888 KB |
testcase_51 | AC | 346 ms
22,016 KB |
testcase_52 | AC | 345 ms
22,016 KB |
testcase_53 | AC | 350 ms
22,016 KB |
testcase_54 | AC | 350 ms
22,016 KB |
testcase_55 | AC | 345 ms
22,016 KB |
testcase_56 | AC | 348 ms
21,888 KB |
testcase_57 | AC | 349 ms
21,888 KB |
testcase_58 | AC | 344 ms
21,888 KB |
testcase_59 | AC | 57 ms
22,016 KB |
testcase_60 | AC | 57 ms
21,888 KB |
testcase_61 | AC | 58 ms
22,016 KB |
testcase_62 | AC | 58 ms
21,888 KB |
testcase_63 | AC | 56 ms
22,016 KB |
testcase_64 | AC | 58 ms
22,016 KB |
testcase_65 | AC | 58 ms
21,888 KB |
testcase_66 | AC | 58 ms
21,888 KB |
testcase_67 | AC | 58 ms
22,016 KB |
testcase_68 | AC | 59 ms
22,144 KB |
testcase_69 | AC | 401 ms
22,016 KB |
testcase_70 | AC | 397 ms
22,016 KB |
testcase_71 | AC | 430 ms
21,888 KB |
testcase_72 | AC | 397 ms
21,888 KB |
testcase_73 | AC | 397 ms
22,016 KB |
testcase_74 | AC | 418 ms
21,888 KB |
testcase_75 | AC | 396 ms
22,016 KB |
testcase_76 | AC | 400 ms
21,760 KB |
testcase_77 | AC | 404 ms
21,888 KB |
testcase_78 | AC | 396 ms
22,016 KB |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 13 NOV 2024 12:12:54 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.060
ソースコード
(defun main (&rest argv) (declare (ignorable argv)) (let* ((*read-default-float-format* 'double-float) (n (read)) (m (read)) (dp (make-array (1+ m) :element-type 'integer :initial-element 0))) (dotimes (_ n) (let* ((a (read)) (b (read)) (c (read)) (d 0) (e 0)) (dotimes (i m) (incf e) (when (>= e a) (incf d b) (incf e (- b a))) (setf (aref dp (1+ i)) (max (aref dp (1+ i)) (* d c)))))) (loop for i from 1 to m do (loop for j from 1 to (floor i 2) do (setf (aref dp i) (max (aref dp i) (+ (aref dp j) (aref dp (- i j))))))) (loop for i from 1 to m do (format t "~d~%" (aref dp i))))) (main)