@anon55659401 please help
I am too waiting for all submissions to become public.If anyone solved it,please post the solution here.
dp1[n] and dp2[n] are two dp-arrays.
My idea was simple and recursive.
the state is (i, a, b)
where i is the index and a is how many consecutive can you take from first array from this index
and b is how many consecutive can you take from second array from this index
call with (0,3,3)
write recursion with memoization. done.