OJ-Problems-Source/HDOJ/1356_autoAC.cpp

6 lines
346 B
C++

1. You can measure dmg using x many amg weights and y many bmg weights.
2. The total number of weights (x + y) is the smallest among those pairs of nonnegative
integers satisfying the previous condition.
3. The total mass of weights (ax + by) is the smallest among those pairs of nonnegative
integers satisfying the previous two conditions.