Open Madhavtib opened 3 years ago
for n=7 the valid combinations are: 1+1+1+1+1+1+1 1+1+5 5+1+1 1+5+1 1+3+3 3+1+3 3+3+1 1+1+1+1+3 1+1+1+3+1 1+1+3+1+1 1+3+1+1+1 3+1+1+1+1
so 12 ways in total
Quite right. My day to day activities do not allow me to venture into competitive coding anymore, unfortunately. If you happen to code a more correct solution, do raise a PR.
for n=7 the valid combinations are: 1+1+1+1+1+1+1 1+1+5 5+1+1 1+5+1 1+3+3 3+1+3 3+3+1 1+1+1+1+3 1+1+1+3+1 1+1+3+1+1 1+3+1+1+1 3+1+1+1+1
so 12 ways in total