#58. 子串计数相等判断
子串计数相等判断
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 .
Output Format
Output is printed to standard output in the following format.
Output
trueif the number of occurrences of "is" equals the number of occurrences of "not"; otherwise, outputfalse.
Sample
This is not
false
This is notnot
true
noisxxnotyynotxisi
true
Sample Explanation
Sample 1: In the string "This is not\