Pigs
Codeforces Round 857 (Div. 2) B. Settlement of Guinea Pigs
你非常喜欢豚鼠。每个笼子可以住两只豚鼠,且你不想把每个笼子放入不同性别的豚鼠。豚鼠只有两种性别。假设你买到豚鼠时并不知道性别,只有医生能够分辨。 接下来的 \(n\) 天方案中,若第 \(i\) 天为 \(1\) ,你买入一只豚鼠;若为 \(2\) ,你请医生分辨你的豚鼠性别。 给出方案,你最少需要 ......
Sell Pigs 题解
[Sell Pigs](https://www.luogu.com.cn/problem/SP4063) [双倍经验](https://www.luogu.com.cn/problem/P4638) ### 题目大意 有 $n$ 个顾客前来买猪,共有 $m$ 个猪圈,每个顾客携带着某一些猪圈的钥匙, ......