Selling
【转载】The Beginner’s Guide to Creating and Selling Cheat Sheets
【from】https://medium.com/practice-in-public/the-beginners-guide-to-creating-and-selling-cheat-sheets-23756af06b12 This is 10x better than your 50-page ......
F. Selling a Menagerie
F. Selling a Menagerie You are the owner of a menagerie consisting of $n$ animals numbered from $1$ to $n$. However, maintaining the menagerie is quit ......
CF1872F Selling a Menagerie
## 思路 对于每一个动物,我们都尽量让它比它害怕的动物先被卖。 考虑拓扑排序,每次输出出度为 $0$ 的点,然后再删点删边。 但是 $n$ 个点,$n$ 条边,必然存在环,所以只用拓扑排序是不行的。 自然想到 tarjan 缩点,对于环外,就拓扑排序好了,对于一个环,显然无法满足所有的点,所以我们 ......
Selling Products
A salesperson must sell n items in a bag with random IDs. The salesperson can remove as many as m items from the bag. Determine the minimum number of ......