Indeed, a correct solution wouldn't even be accepted since the test cannot run properly. You're trying to create a matrix where rows don't have equal length. Matlab doesn't like that, but it doesn't even makes sense mathematically. Also, as Chris said, as long as you have one solution, you have many of them, since you can do permutation of elements inside a row without changing the row sum. You probably have to have a way to include all possible solution (maybe just focus on the variance and the fact that there is a one to one correspondence between elements in the inputted vector and the outputted matrix?).
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.