Digit Dp problem needs help

Правка en2, от Loser_, 2020-12-08 15:41:36

Need help with this digit dp problem Almost Everywhere Zero from Atcoder. Here,I increase the $$$cnt$$$ value if the $$$i$$$ th digit is non zero.Base case is if cnt==k return 1 or 0 otherwise.My submission works for smaller values but fails larger inputs or maybe I am missing some cases.I also see others solutions but couldn't find one using reccursion in my approach. Need help here. Thank you

My submission

Теги digitdp, #atcoder, help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Loser_ 2020-12-08 15:41:36 82
en1 Английский Loser_ 2020-12-08 15:38:03 468 Initial revision (published)