by@akouryy1
AC
550ms
c>1-:fia*iv v^?:p@~i+ < >2>:fgffp>3+::fgffgv v8^?+1:-a^?(9:pf$- < >fgafg*7fgbfg*-3fg*6fgbfg*8fg9fg*-4fg*7fg9fg*6fgafg*-5fg*++6,n;
66 29 51 08 19 73 83 10 08 95 13 73
14416