ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2018. The Debut Album

Hints. Many hints for desperate people
Posted by Kirill~ 20 Mar 2022 22:02
Hint 1: How many sequences end with '1' or '2'

Hint 2: s_a[0] = 1;         s_b[0] = 1;

Hint 3: s_a[i+j] = (s_a[i+j] + s_b[i])%inf;
Where i+j <=n and i<n and j<= a
 Repeat this with s_b

Good luck! :)