結果
問題 | No.2561 みんな大好きmod 998 |
ユーザー |
![]() |
提出日時 | 2024-11-05 20:49:31 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 584 bytes |
コンパイル時間 | 379 ms |
コンパイル使用メモリ | 33,756 KB |
実行使用メモリ | 37,196 KB |
最終ジャッジ日時 | 2024-11-05 20:49:38 |
合計ジャッジ時間 | 6,444 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 43 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 05 NOV 2024 08:49:31 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.013
ソースコード
(defconstant +mod998+ 998)(defconstant +mod9982+ 998244353)(defun main (&rest argv)(declare (ignorable argv))(let* ((n (read))(k (read))(a (make-array n))(res 0))(dotimes (i n) (setf (aref a i) (read)))(labels ((f (x y z)(when (= x k)(when (<= (mod z +mod9982+) (mod z +mod998+))(incf res)))(loop for i from (1+ y) below n do(f (1+ x) i (+ z (aref a i))))))(f 0 -1 0))(format t "~d~%" (mod res +mod998+))))(main)