7 ifstream in
; in
.open("business.in");
8 ofstream out
; out
.open("business.out");
13 int result
= 1000000000;
14 for (int i
= 0; i
< m
; i
++) {
18 for (int j
= 0; j
<= n
; j
++) {
19 int f
= u
* j
- d
* (n
- j
);
21 result
= min(result
, f
);
25 out
<< result
<< endl
;