QOJ.ac

QOJ

时间限制: 1.0 s 内存限制: 256 MB 总分: 100

#15349. 扫地机器人 II

统计

(请先阅读 Robot Cleaner I 的题目描述。)

厌倦了每次都根据房间的具体情况为机器人编写程序,宝宝决定写一个“超级程序”,使得无论垃圾在房间里如何分布,机器人都能利用这个程序捡起大部分垃圾。

为了简化这个问题,我们现在对宝宝的房间和机器人做一些限制。

  • $n = m = 12$;
  • 对于所有 $1 < i < n$ 且 $1 < j < m$,$(i, j)$ 不是墙;
  • 房间里恰好有 50 个垃圾,且它们是等概率随机分布的;
  • 机器人总是从 $(2, 2)$ 出发。

你的任务是设计这个“超级程序”,使得将该程序输入控制器后,在上述限制下,机器人执行 200 条指令后能够捡起房间里至少 95% 的垃圾。

输入格式

本题没有输入。

输出格式

你应该在单行中输出一个长度为 243 ($243 = 3^5$) 的字符串,由 'U'、'D'、'L'、'R'、'P' 和 'I' 组成,表示你的超级程序。

样例

输入样例 1

(No input)

输出样例 1

IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII >>
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII >>
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII >>
IIIIIIIIIIIIIIIIII

说明

在上述样例中,“>>” 表示当前行和下一行的内容在实际输出中其实是在同一行。我们在这里不得不将它们拆分成不同的行,因为它们太长了,无法放入印刷版题面的单行中。请参阅比赛网站以获取更准确的输出示例。

另请注意,此输出样例(显然)不是正确答案。它仅用于向你展示输出格式。

我们在上述限制下准备了 1000 个随机生成的房间,并将对你的方案进行测试。如果你的机器人在执行超级程序中的 200 条指令后,在这 1000 个房间中平均能够捡起至少 95% 的垃圾,你的方案将被接受。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.