LOOKUP

AtCoder
IDabc279_b
Time2000ms
Memory256MB
Difficulty
You are given strings $S$ and $T$ consisting of lowercase English letters. Determine whether $T$ is a (contiguous) substring of $S$. A string $Y$ is said to be a (contiguous) substring of $X$ if and only if $Y$ can be obtained by performing the operation below on $X$ zero or more times. * Do one of the following. * Delete the first character in $X$. * Delete the last character in $X$. For instance, `tag` is a (contiguous) substring of `voltage`, while `ace` is not a (contiguous) substring of `atcoder`. ## Constraints * $S$ and $T$ consist of lowercase English letters. * $1 \le |S|,|T| \le 100$ ($|X|$ denotes the length of a string $X$.) ## Input The input is given from Standard Input in the following format: $S$ $T$ [samples]
Samples
Input #1
voltage
tag
Output #1
Yes

`tag` is a (contiguous) substring of `voltage`.
Input #2
atcoder
ace
Output #2
No

`ace` is not a (contiguous) substring of `atcoder`.
Input #3
gorilla
gorillagorillagorilla
Output #3
No
Input #4
toyotasystems
toyotasystems
Output #4
Yes

It is possible that $S=T$.
API Response (JSON)
{
  "problem": {
    "name": "LOOKUP",
    "description": {
      "content": "You are given strings $S$ and $T$ consisting of lowercase English letters. Determine whether $T$ is a (contiguous) substring of $S$. A string $Y$ is said to be a (contiguous) substring of $X$ if and o",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc279_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given strings $S$ and $T$ consisting of lowercase English letters. Determine whether $T$ is a (contiguous) substring of $S$.\nA string $Y$ is said to be a (contiguous) substring of $X$ if and o...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments