Universal Cup Judging System

Universal Cup

Süre Sınırı: 1.0 s Bellek Sınırı: 128 MB Toplam puan: 100 Hack'lenebilir ✓
İstatistikler

今年の CERC は、歴史上初めてドワーフのチームを迎えて開催されます。ドワーフたちは非常に長い間問題解決の練習を重ねてきており、コンテストで全力を尽くす決意をしています。コンテストが終わる前に、彼らはこの素晴らしいイベントを記念する意味のあるお土産を確実に持ち帰りたいと考えています。そこで彼らは、提出に成功した瞬間にチームステーションで記念写真を撮ることにしました。提出する解答はすでに準備できており、写真を撮ってくれるボランティアも見つけました。あとは、写真にどの順番で写るかを決めるだけです。

3 人のドワーフはそれぞれ自分の T シャツにいくつかの文字が書かれており、写真の中で彼らの T シャツの文字列をつなぎ合わせると文字列 cerc になればとても面白いだろうと気づきました。この文字列はチームの一部だけで形成しても構いません。T シャツが cerc の形成に参加しないドワーフは、この写真では脇に退き、後の写真でポーズをとることにします。

ドワーフたちのうち誰が、どの順番で写真のポーズをとるべきかを決めるのを手伝ってください。彼らの T シャツの文字列をつなぎ合わせたものは、文字列 cerc を単に部分文字列として含むのではなく、ちょうど cerc と一致しなければなりません。

入力

入力は 3 行からなります。$i$ 行目には $i$ 番目のドワーフの T シャツに書かれた内容が与えられます。

出力

チームが写真の中で文字列 cerc を作ることができない場合は、NO という単語だけを 1 行に出力してください。

そうでない場合は、3 行を出力してください:

  1. 1 行目には YES と出力してください。
  2. 2 行目には文字列 cerc を作るドワーフの人数を出力してください。
  3. 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.