网站首页
编程语言
数据库
系统相关
其他分享
编程问答
CF2038F
2024-11-19
CF2038F
\(\max(\min\{v\},\min\{r\})\)太难看了!!!运用经典trick:\(\max(a,b)=a+b-\min(a,b)\),可得:\[\max(\min\{v\},\min\{r\})=\min\{v\}+\min\{r\}-\min(\min\{v\},\min\{r\})\]我们设\(a_i=\min(v_i,r_i)\),式子变成\(\min\{v\}+\min\{r\}