#P12517. 「MSTOI-R1」MST Find

「MSTOI-R1」MST Find

Problem Description

You are given a string. Count how many times M, S, and T appear in the string.

It is case-insensitive.

The length of the input string is guaranteed to be n105n \le 10^5.

Input Format

Input one string in a single line, guaranteed to contain only uppercase letters, lowercase letters, and spaces.

Note: Spaces are also part of the string.

Output Format

Output three natural numbers in one line, separated by spaces, representing the counts of M, S, and T in the string.

MinimumSpanningTree MSTqwq
4 2 2
You must DO your hOMeWork
2 1 1

Hint

Assume the length of the input string is nn. Then 1n1051 \le n \le 10^5. It is guaranteed to contain only uppercase letters, lowercase letters, and spaces.

Translated by ChatGPT 5