2 for (int c0
= m
; c0
<= min(p
- 1, n
); c0
+= 1)
4 for (int c0
= p
; c0
<= min(m
- 1, q
); c0
+= 1)
6 for (int c0
= max(m
, p
); c0
<= min(q
, n
); c0
+= 1) {
10 for (int c0
= max(max(q
+ 1, m
), p
); c0
<= n
; c0
+= 1)
12 for (int c0
= max(max(n
+ 1, m
), p
); c0
<= q
; c0
+= 1)