#305. 查找特定模式的3字符子串

    ID: 305 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatString-2gesp3字符串暴力枚举

查找特定模式的3字符子串

Find Fuzzy 'bob'

Background

Congcong is currently learning about string processing. He encountered an interesting problem that requires determining if a string contains a substring of a specific pattern.

Problem Description

Return true if the given string contains a substring that starts with 'b', ends with 'b', and has a length of 3. Otherwise, return false.

Input Format

Input is given from standard input in the following format.

s

Output Format

Output is printed to standard output in the following format.

Output true if the string contains such a substring; otherwise, output false.

Sample

abcbob
true
b9b
true
bac
false

Sample Explanation

Sample 1: The string "abcbob" contains the substring "bob\