(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)