r
i
j
D
1
D
2
D
3
D
4
D
5
S
1
1
1
1
1
0
S
2
1
1
1
1
0
S
3
0
0
0
1
1
S
4
0
1
1
1
1