Create all arrays of non-negative integers of length N where the array sum is equal to T. The output order of arrays does not matter.
Possible solutions are e.g.
N = 5, T = 2:
1 1 0 0 0
1 0 1 0 0
1 0 0 1 0
1 0 0 0 1
0 1 1 0 0
0 1 0 1 0
0 1 0 0 1
0 0 1 1 0
0 0 1 0 1
0 0 0 1 1
2 0 0 0 0
0 2 0 0 0
0 0 2 0 0
0 0 0 2 0
0 0 0 0 2
N = 4, T = 5
0 4 1 0
1 1 2 1
2 0 3 0
0 3 1 1
...
Erroneous outputs would be:
N = 3, T = 1
1 1 1
3 0 0
N = 4, T = 2
0 1 1
0 2 0 0 0 0
Edit: I sadly do not understand most of these very short code golf languages (but admire the creativity of them). To understand what you mean, main stream languages or explanations are encouraged. (How about Java, C# or C++?)