QOJ.ac

QOJ

Time Limit: 1.0 s Memory Limit: 128 MB Total points: 100 Hackable ✓

#16011. Letters on T-shirts

الإحصائيات

今年的 CERC 是历史上第一次有矮人队伍参赛。矮人们练习解题已经很长时间了,他们决心在比赛中尽其所能。在比赛结束前,他们想确保带一份有意义的纪念品回家,以纪念这次美妙的活动。他们决定在提交成功时,在他们的团队工位上拍一张合影。他们已经准备好了一个提交方案,并找了一位志愿者来拍照。现在他们需要决定以什么顺序出现在照片中。

三个矮人中的每一个人的 T 恤上都写着一些字母,他们意识到,如果照片中他们 T 恤上的字符串组合起来拼成 cerc,那将会非常有趣。这个字符串可以仅由团队的一部分人组成:那些 T 恤上的字母不参与组成 cerc 字符串的矮人将退到一边,在之后的照片中再摆姿势。

请帮助矮人们决定哪些人应该出现在照片中,以及以什么顺序排列。他们 T 恤上的字符串组合必须恰好构成 cerc 字符串,而不仅仅是包含它作为子串。

输入格式

输入包含三行。第 $i$ 行包含第 $i$ 个矮人 T 恤上的内容。

输出格式

如果团队无法在照片中组成 cerc 字符串,输出一行 NO

否则,输出三行:

  1. 第一行输出 YES
  2. 第二行输出将组成 cerc 字符串的矮人数量。
  3. 第三行输出这些矮人的编号,按他们在照片中出现的顺序排列。

如果有多种解法,输出其中任意一种即可。

输入中的每个字符串均为小写拉丁字母,长度在 1 到 5 之间。

样例

输入 1

abc
rc
ce

输出 1

YES
2
3 2

输入 2

cer
cr
icpc

输出 2

NO

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.