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