uva 10134 - AutoFish(simulation)

本文介绍了一个关于编程机器人钓鱼的问题。机器人使用COD语言进行编程,包括钓鱼、切饵和午餐三个指令。切饵需要20分钟产生一个鱼饵单位,存储限制为3个。钓鱼遵循确定性行为,每70分钟最多捕获一次,且需在上一条鱼被捕获后等待30分钟。若无鱼饵,钓鱼指令无效。午餐指令仅用于模拟时间流逝。任务是计算机器人在指令序列结束时捕获的鱼数。
摘要由CSDN通过智能技术生成

Question 4: AutoFish

The Problem

You've built an amazing fish-catching robot, but you've discovered one small flaw: the robot can't decide whether to fish or cut bait.

You've designed a language for the Control of Oceangoing Devices (COD) which you plan to use to program the robot. COD has three instructions:

fish Fish for ten minutes.
bait Cut bait for ten minutes.
lunch No operation for ten minutes.

Bait is required to catch fish. The robot must cut bait for twenty minutes (execute two bait instructions) to generate a single bait unit, enough bait to catch a single fish. Other instructions (fish and lunch) may be interleaved between the two

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值