ZOJ-3805---Machine (记忆化dfs)

该博客讨论了一种工厂机器布局问题,目标是设计一条组装线使得货架宽度最小。机器间通过'I'型和'L'型管道连接,每台机器可能从零到两台其他机器获取原料。问题被转换成一棵倒置的二叉树,通过记忆化递归的方法解决,寻找每个节点(机器)及其子节点的最窄宽度。博客提供了样例输入和输出,以及解决问题的策略和AC代码。
摘要由CSDN通过智能技术生成
Machine

Time Limit: 2 Seconds      Memory Limit: 65536 KB

In a typical assembly line, machines are connected one by one. The first machine's output product will be the second machine's raw material. To simplify the problem, we put all machines into a two-dimension shelf. Every machine occupied exactly one grid and has two input ports and only one output port. One input port can get material from only one machine.

Pipes will be used to connect between these machines. There are two kinds of pipes : 'I' kind and 'L' kind. We should notice that the 'I' kind pipe can be linked one by one. Each pipe will also occupied one grid.

In Bob's f

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值