結果
問題 | No.1359 [Zelkova 3rd Tune] 四人セゾン |
ユーザー | Common Lisp |
提出日時 | 2024-11-03 20:03:05 |
言語 | Common Lisp (sbcl 2.3.8) |
結果 |
AC
|
実行時間 | 1,240 ms / 2,000 ms |
コード長 | 1,400 bytes |
コンパイル時間 | 329 ms |
コンパイル使用メモリ | 41,732 KB |
実行使用メモリ | 37,008 KB |
最終ジャッジ日時 | 2024-11-03 20:04:12 |
合計ジャッジ時間 | 66,333 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 9 ms
32,148 KB |
testcase_01 | AC | 9 ms
26,024 KB |
testcase_02 | AC | 10 ms
26,024 KB |
testcase_03 | AC | 609 ms
32,944 KB |
testcase_04 | AC | 627 ms
30,788 KB |
testcase_05 | AC | 575 ms
30,784 KB |
testcase_06 | AC | 603 ms
34,960 KB |
testcase_07 | AC | 857 ms
32,908 KB |
testcase_08 | AC | 841 ms
30,628 KB |
testcase_09 | AC | 230 ms
28,832 KB |
testcase_10 | AC | 231 ms
28,960 KB |
testcase_11 | AC | 1,092 ms
34,868 KB |
testcase_12 | AC | 1,070 ms
34,992 KB |
testcase_13 | AC | 708 ms
30,876 KB |
testcase_14 | AC | 683 ms
32,908 KB |
testcase_15 | AC | 600 ms
30,912 KB |
testcase_16 | AC | 595 ms
34,956 KB |
testcase_17 | AC | 1,165 ms
32,704 KB |
testcase_18 | AC | 1,136 ms
34,996 KB |
testcase_19 | AC | 997 ms
32,832 KB |
testcase_20 | AC | 1,007 ms
34,868 KB |
testcase_21 | AC | 1,085 ms
34,872 KB |
testcase_22 | AC | 1,084 ms
34,976 KB |
testcase_23 | AC | 724 ms
34,952 KB |
testcase_24 | AC | 752 ms
34,804 KB |
testcase_25 | AC | 114 ms
28,840 KB |
testcase_26 | AC | 113 ms
28,712 KB |
testcase_27 | AC | 404 ms
28,840 KB |
testcase_28 | AC | 377 ms
34,792 KB |
testcase_29 | AC | 457 ms
28,824 KB |
testcase_30 | AC | 482 ms
30,852 KB |
testcase_31 | AC | 613 ms
30,916 KB |
testcase_32 | AC | 637 ms
34,964 KB |
testcase_33 | AC | 454 ms
30,620 KB |
testcase_34 | AC | 477 ms
28,828 KB |
testcase_35 | AC | 596 ms
30,912 KB |
testcase_36 | AC | 624 ms
32,816 KB |
testcase_37 | AC | 124 ms
28,864 KB |
testcase_38 | AC | 125 ms
28,864 KB |
testcase_39 | AC | 101 ms
28,620 KB |
testcase_40 | AC | 101 ms
26,660 KB |
testcase_41 | AC | 215 ms
28,708 KB |
testcase_42 | AC | 213 ms
28,832 KB |
testcase_43 | AC | 177 ms
28,576 KB |
testcase_44 | AC | 1,150 ms
32,836 KB |
testcase_45 | AC | 477 ms
30,740 KB |
testcase_46 | AC | 163 ms
32,636 KB |
testcase_47 | AC | 820 ms
32,892 KB |
testcase_48 | AC | 751 ms
30,744 KB |
testcase_49 | AC | 796 ms
30,756 KB |
testcase_50 | AC | 593 ms
32,824 KB |
testcase_51 | AC | 37 ms
30,400 KB |
testcase_52 | AC | 1,036 ms
32,960 KB |
testcase_53 | AC | 1,199 ms
37,008 KB |
testcase_54 | AC | 1,224 ms
32,932 KB |
testcase_55 | AC | 1,228 ms
32,928 KB |
testcase_56 | AC | 1,214 ms
32,928 KB |
testcase_57 | AC | 1,221 ms
36,872 KB |
testcase_58 | AC | 1,217 ms
32,920 KB |
testcase_59 | AC | 1,212 ms
34,960 KB |
testcase_60 | AC | 1,199 ms
37,004 KB |
testcase_61 | AC | 1,148 ms
34,960 KB |
testcase_62 | AC | 1,221 ms
32,924 KB |
testcase_63 | AC | 1,235 ms
32,668 KB |
testcase_64 | AC | 1,233 ms
34,964 KB |
testcase_65 | AC | 1,213 ms
36,852 KB |
testcase_66 | AC | 1,218 ms
32,800 KB |
testcase_67 | AC | 1,240 ms
32,800 KB |
testcase_68 | AC | 1,212 ms
32,796 KB |
testcase_69 | AC | 1,150 ms
32,924 KB |
testcase_70 | AC | 1,190 ms
36,872 KB |
testcase_71 | AC | 1,129 ms
32,924 KB |
testcase_72 | AC | 1,188 ms
32,924 KB |
testcase_73 | AC | 1,214 ms
34,832 KB |
testcase_74 | AC | 1,190 ms
32,928 KB |
testcase_75 | AC | 1,221 ms
34,968 KB |
testcase_76 | AC | 1,168 ms
34,936 KB |
testcase_77 | AC | 1,190 ms
34,972 KB |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 03 NOV 2024 08:03:05 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.028
ソースコード
(defun %mod-expt (a n m) (let ((result 1)) (loop while (> n 0) when (oddp n) do (setq result (mod (* result a) m)) do (setq a (mod (* a a) m)) (setq n (ash n -1))) result)) (defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (k (read)) (m (read)) (p-arr (make-array n :element-type 'integer)) (e-arr (make-array n :element-type 'integer)) (a-arr (make-array n :element-type 'integer)) (h-arr (make-array n :element-type 'integer)) (res 0)) (dotimes (i n) (setf (aref p-arr i) (read))) (dotimes (i n) (setf (aref e-arr i) (read))) (dotimes (i n) (setf (aref a-arr i) (read))) (dotimes (i n) (setf (aref h-arr i) (read))) (sort p-arr #'<) (sort e-arr #'<) (sort a-arr #'<) (sort h-arr #'<) (dotimes (i n) (incf res (%mod-expt (- (max (aref p-arr i) (aref e-arr i) (aref a-arr i) (aref h-arr i)) (min (aref p-arr i) (aref e-arr i) (aref a-arr i) (aref h-arr i))) k m)) (setf res (mod res m))) (format t "~d~%" res))) (main)