HDU1890 Robotic Sort(伸展树换根+删除操作)

【题目描述】

Somewhere deep in the Czech Technical University buildings, there are laboratories for examining mechanical and electrical properties of various materials. In one of yesterday’s presentations, you have seen how was one of the laboratories changed into a new multimedia lab. But there are still others, serving to their original purposes. 

在捷克技术大学大楼的深处,有实验室用来检查各种材料的机械和电气性能。在昨天的一次演示中,您已经看到了一个实验室是如何变成一个新的多媒体实验室的。但还有其他实验室,服务于它们的原始目的。

In this task, you are to write software for a robot that handles samples in such a laboratory. Imagine there are material samples lined up on a running belt. The samples have different heights, which may cause troubles to the next processing unit. To eliminate such troubles, we need to sort the samples by their height into the ascending order. 

在这项任务中,你要为一个在实验室处理样本的机器人编写软件。想象一下,跑道上有一些材料样本排列在一起。样品具有不同的高度,这可能会给下一个处理单元带来麻烦。为了消除这种麻烦,我们需要把样品按高度分类成升序。

Reordering is done by a mechanical robot arm, which is able to pick up any number of consecutive samples and turn them round, such that their mutual order is reversed. In other words, one robot operation can reverse the order of samples on positions between A and B.

重新排序由机械机械手臂完成,机械手臂能够拾取任

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值