Thanks
Codeforces Round 637 (Div. 2) - Thanks, Ivan Belonogov! A. Nastya and Rice
纳斯塔亚掉了 \(n\) 个谷物,每个谷物的重量范围在 \([a - b, a + b]\) 。她猜测谷物的总重量范围在 \([c - d, c + d]\) 。询问她的猜测是否正确。 显然,若 \([n(a-b), n(a+b)]\) 和 \([c - d, c + d]\) 有交,则她的猜测正确 ......
CF996 Codeforces Round 492 (Div. 2) [Thanks, uDebug!]
CF996A Hit the Lottery 直接贪心尽可能的分配到 \(k_5\),剩下的依次分配给 \(k_4,k_3,k_2,k_1\)。 #include<iostream> #include<cstdio> using namespace std; int n; int k[6]; int ......