2019 Multi-University Training Contest 5
A. fraction
upsolved
The meaning of problems input \ (X, P \) , the smallest output \ (B \) such that \ (bx \% p <b \)
practice
- \(bx-py<b\),即 \(b(x-1)<py\),即 \(\frac{b}{y}<\frac{p}{x-1}\)
- On the other hand, \ (BX> Py \) , i.e., \ (\ frac {p} { x} <\ frac {b} {y} \)
- GCD can be.
D. equation
solved by rdc 78min -2
The meaning of problems seeking \ (\ sum_ {i = 1 } ^ {n} | a_ix + b_i | = C \) solution.
Practice piecewise function of zero order, ascending scanning, recording the slope and intercept.