思维
文章平均质量分 79
xlhzxx8127
人菜瘾大
展开
-
线段树(练习/7/31)
Description Railway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue… The Lunar New Year was approaching, but unluckily the Little Cat still had schedules going here and there. Now, he had to t原创 2021-07-31 21:46:26 · 77 阅读 · 0 评论 -
2021/7/23
链接:https://ac.nowcoder.com/acm/problem/17315 来源:牛客网 Applese有1个容量为v的背包,有n个物品,每一个物品有一个价值ai,以及一个大小bi 然后他对此提出了自己的疑问,如果我不要装的物品装的价值最大,只是一定需要装m个物品,要使得求出来的物品价值的中位数最大 Applese觉得这个题依然太菜,于是他把这个问题丢给了你 当物品数量为偶数时,中位数即中间两个物品的价值的平均值 输入描述: 第一行三个数v, n, m,分别代表背包容量,物品数量以及需要取出的原创 2021-07-23 22:44:38 · 226 阅读 · 0 评论 -
贪心思想(2021/7/15)
Description Here is a famous story in Chinese history. That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others. Both of Tian and the king have three horses in different cl原创 2021-07-15 00:58:29 · 84 阅读 · 0 评论