D - Outweigh 解説 by en_translator
Original proposer: vwxyz
If \(A_i \leq B_i\) for all \(i\), the total weight of Takahashi’s stones never strictly exceeds the total weight of Aoki’s, regardless of \(W_i\).
Otherwise, there exists an \(i\) such that \(A_i \gt B_i\).
Take such an \(i\). Setting
\(W_j= \begin{cases}10^{18}(j=i)\\1(j \neq i)\end{cases}\)
satisfies the conditions. (Choosing \(10^{18}\) is not mandatory; it suffices as long as it is large enough.)
We can assert that this construction is valid because:
\(\sum_{j=1}^{N}(A_j-B_j)W_j\\
=\sum_{j \neq i}(A_j-B_j)+(A_i-B_i) \times 10^{18}\\
\geq (1-10^9) \times (N-1) +10*{18}\\
\geq (1-10^9) \times 10^5 +10*{18}\\
\gt 0.\)
This is a type of problem called “construction.” You may be puzzled if you are not used to it, but considering the following approaches often helps solving:
- Identify impossible cases (conditions).
- Come up with a construction, when no impossible cases are satisfied.
投稿日時:
最終更新: