
差分约束
xuanweiace
一个热爱算法竞赛的弱校ACMer路过。青大本,浙大硕,方向后端开发,菜鸡一枚,奋斗ing...
展开
-
【POJ - 3169】 Layout(差分约束+spfa)(当板子记?)
题干: Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a straight line waiting for feed. The cows ...原创 2018-08-02 22:44:34 · 262 阅读 · 0 评论 -
【POJ - 3159】Candies (差分约束,卡SPFA)
题干: 在幼儿园的时候,Flymouse是班上的班长。有时班主任会给班上的孩子们带来一大袋糖果,让他们分发。所有的孩子都非常喜欢糖果,经常比较他们和别人买的糖果的数量。一个孩子A可以有这样的想法,尽管可能是另一个孩子B在某些方面比他好,因此他有理由比他应得更多的糖果,但无论他实际得到多少糖果,他都不应该得到比B少的一定数量的糖果,否则他会感到不满意,去喝头茶。雪儿抱怨飞鼠的偏态分布。 当时史努比...原创 2019-05-02 16:32:14 · 341 阅读 · 0 评论 -
【BZOJ - 3436】小K的农场(差分约束)
题干: 背景 小K是个特么喜欢玩MC的孩纸。。。 描述 小K在MC里面建立很多很多的农场,总共n个,以至于他自己都忘记了每个农场中种植作物的具体数量了,他只记得 一些含糊的信息(共m个),以下列三种形式描述:农场a比农场b至少多种植了c个单位的作物,农场a比农场b至多 多种植了c个单位的作物,农场a与农场b种植的作物数一样多。但是,由于小K的记忆有些偏差,所以他想要知道存 不存在一种...原创 2019-08-06 21:23:20 · 189 阅读 · 0 评论 -
【POJ - 1275】Cashier Employment(差分约束,建图)
题干: A supermarket in Tehran is open 24 hours a day every day and needs a number of cashiers to fit its need. The supermarket manager has hired you to help him, solve his problem. The problem is that ...原创 2019-08-09 21:02:01 · 413 阅读 · 0 评论 -
【HDU - 3440】House Man(差分约束)
题干: In Fuzhou, there is a crazy super man. He can’t fly, but he could jump from housetop to housetop. Today he plans to use N houses to hone his house hopping skills. He will start at the shortest ho...原创 2019-08-09 21:01:48 · 374 阅读 · 0 评论 -
【POJ - 1364】King(差分约束判无解)
题干: Once, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: ``If my child was a son and if only he was a sound king.'' After nine months her child was born, and...原创 2019-08-09 21:44:19 · 407 阅读 · 0 评论