The first line creates an array of int arrays. There are 10 slots for the created arrays.
The third line creates a new int array and puts it in one of the slots that you made at the beginning. The new int array has r + 1 spaces for ints in it.
So, the int array at position 0 will have 1 slot for int. The int array at position 1 will have 2 slots for int. The general form will be:
[ [0], [0,0], [0,0,0], ..., [0,0,0,0,0,0,0,0,0,0] ]
which alludes to the name of the tri variable (it looks like a triangle)
source share