uva 10599 Robots(II) (DP)

这篇博客探讨了一种优化机器人清理垃圾的方法。在体育赛事或音乐会后的场地清洁中,公司提供能够拾取垃圾的机器人。机器人从西北角出发,沿着东或南方向移动,直到东南角结束。目标是使机器人清理最多含有垃圾的单元格。文章通过一个包含6行7列的示例地图,展示了如何使用动态规划找到清理最多垃圾单元格的不同路径,并给出了其中一个有效序列。输入数据包括地图的行数、列数和垃圾位置,输出是最大清理单元格数量、可能的清理方式数量以及一种清理顺序。
摘要由CSDN通过智能技术生成

Robots(II)

Time Limit

1 Second

Your company provides robots that can be used to pick up litter from fields after sporting events and concerts. Before robots are assigned to a job, an aerial photograph of the field is marked with a grid. Each location in the grid that contains garbage is marked. All robots begin in the Northwest corner and end their movement in the Southeast corner. A robot can only move in two directions, either to the East or South. Upon entering a cell that contains garbage, the robot can be programmed to pick it up before proceeding. Once a robot reaches its destination at the Southeast corner it cannot be repositioned or reused. Since your expenses are directly proportional to the number of robots used for a particular job, you are interested in making the most out of them. Your task would be to use a robot to clean the maximum number of cells containing garbage. Now there can be many ways to do this job, so your task would be to report that number of ways and show us one such sample.

You see your robot can traverse many cells without picking up garbage, so for us a valid solution would be the sequence of cell numbers that the robot cleans. The robots only clean cells that contain garbage; but you can program them to avoid picking up garbage from specific cells, if you would want to.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值