当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6195:cable cable cable

题目描述
Connecting the display screen and signal sources which produce different color signals by cables, then the display screen can show the color of the signal source.Notice that every signal source can only send signals to one display screen each time.
Now you have $M$ display screens and $K$ different signal sources($K \leq M \leq 2^{32}-1$). Select $K$ display screens from $M$ display screens, how many cables are needed at least so that **any** $K$ display screens you select can show exactly $K$ different colors.
输入解释
Multiple cases (no more than $100$), for each test case:
there is one line contains two integers $M$ and $K$.
输出解释
Output the minimum number of cables $N$.
输入样例
3 2
20 15
输出样例
4
90
提示
As the picture is shown, when you select M1 and M2, M1 show the color of K1, and M2 show the color of K2. When you select M3 and M2, M2 show the color of K1 and M3 show the color of K2. When you select M1 and M3, M1 show the color of K1.
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6195

最后修改于 2020-10-25T23:29:12+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)