#58. 子串计数相等判断

    ID: 58 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatString-3gesp3字符串模拟

子串计数相等判断

Substring Count Equality Check

Background

Congcong is currently learning about string processing. He encountered an interesting problem that requires checking if the number of occurrences of specific substrings in a given string are equal.

Problem Description

Given a string, return true if the number of appearances of "is" anywhere in the string is equal to the number of appearances of "not" anywhere in the string (case sensitive); otherwise, return false.

Input Format

Input is given from standard input in the following format.

A single line containing string SS.

Output Format

Output is printed to standard output in the following format.

Output true if the number of occurrences of "is" equals the number of occurrences of "not"; otherwise, output false.

Sample

This is not
false
This is notnot
true
noisxxnotyynotxisi
true

Sample Explanation

Sample 1: In the string "This is not\