摘要: 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的 阅读全文
posted @ 2020-02-16 22:43 MOSHANG_SUSIE 阅读(165) 评论(0) 推荐(0)
摘要: Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s 阅读全文
posted @ 2020-02-16 22:28 MOSHANG_SUSIE 阅读(158) 评论(0) 推荐(0)
摘要: 虽然大佬已经为我们罗列了背包九讲:https://blog.csdn.net/m0_37809890/article/details/83153974 但是我觉得自己还是要再罗列 01背包 有n件物品,每件物品的重量为w[i],价值为c[i]。现有一个容量为V的背包,问如何选取物品放入背包,使得背包 阅读全文
posted @ 2020-02-16 22:23 MOSHANG_SUSIE 阅读(551) 评论(0) 推荐(0)
摘要: Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea 阅读全文
posted @ 2020-02-16 21:24 MOSHANG_SUSIE 阅读(175) 评论(0) 推荐(0)
摘要: A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arrangement mu 阅读全文
posted @ 2020-02-16 20:35 MOSHANG_SUSIE 阅读(267) 评论(0) 推荐(0)
摘要: A factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always del 阅读全文
posted @ 2020-02-16 20:29 MOSHANG_SUSIE 阅读(220) 评论(0) 推荐(0)