验证子串

Luogu
IDLGB2118
Time1000ms
Memory128MB
DifficultyP1
字符串(入门)
输入两个字符串,验证其中一个串是否为另一个串的子串。 ## Input 两行,每行一个字符串。 ## Output 若第一个串 $s_1$ 是第二个串 $s_2$ 的子串,则输出`(s1) is substring of (s2)`; 否则,若第二个串 $s_2$ 是第一个串 $s_1$ 的子串,输出`(s2) is substring of (s1)`; 否则,输出 `No substring`。 [samples] ## Note 对于 $100 \%$ 的数据,字符串长度在 $30$ 以内。
Samples
Input #1
abc
dddncabca
Output #1
abc is substring of dddncabca
Input #2
aaa
bbb
Output #2
No substring
API Response (JSON)
{
  "problem": {
    "name": "验证子串",
    "description": {
      "content": "输入两个字符串,验证其中一个串是否为另一个串的子串。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB2118"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "输入两个字符串,验证其中一个串是否为另一个串的子串。\n\n## Input\n\n两行,每行一个字符串。\n\n## Output\n\n若第一个串 $s_1$ 是第二个串 $s_2$ 的子串,则输出`(s1) is substring of (s2)`;\n\n否则,若第二个串 $s_2$ 是第一个串 $s_1$ 的子串,输出`(s2) is substring of (s1)`;\n\n否则,输出 `No subs...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments