問題一覧 > 通常問題

No.1367 String Kadomatsu

レベル : / AI推定難易度 : 147 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 256 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 212
作問者 : mai / テスター : face4
お気に入りにしたユーザー ProblemId : 3412 / 自分の提出
問題文最終更新日: 2020-11-07 02:05:27
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 280 (門松コンテスト) (順位表) の他の問題:

Problem Statement

You are given a string S.
Determine whether the string can be made equal to kadomatsu by performing the following operation zero or more times.

  • Insert any one character at any position. It may also be inserted at the beginning or at the end.

Input

$S$

$1 \le |S| \le 10$
It consists of lowercase letters.

Output

Print Yes if the string can be turned into kadomatsu by performing the insertion operation zero or more times, and No otherwise.

Sample

Sample 1
Input
kadomatu
Output
Yes

This can be done by inserting s.

Sample 2
Input
yukicoder
Output
No

This is impossible. Making it ykadomatsukicoder would allow it to contain kadomatsu, but it would not be equal to it.

Sample 3
Input
kadomatsu
Output
Yes

It can be made into kadomatsu with zero insertions.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。