#C6520. Plant Categorization
Plant Categorization
Plant Categorization
In this problem, you are given multiple test cases where each test case describes a list of plants. Each plant is assigned a category which is one of the following: Flower, Bush, or Tree. Your task is to count the number of each type of plant in each test case.
For each test case:
- The first line contains an integer (N) that denotes the number of plants.
- The following (N) lines each contain the plant's name followed by its category, separated by a space.
Let (F) be the number of flowers, (B) be the number of bushes, and (T) be the number of trees. You should output the counts in the following format:
Total Flowers: (F) Total Bushes: (B) Total Trees: (T)
Input is provided via standard input and your output should be printed to standard output.
inputFormat
The first line of input contains an integer (T) denoting the number of test cases. For each test case, the first line contains an integer (N) representing the number of plants. This is followed by (N) lines, each containing a plant name and its category (either 'Flower', 'Bush', or 'Tree') separated by a space.
outputFormat
For each test case, output three lines: Total Flowers: X Total Bushes: Y Total Trees: Z where X, Y, and Z represent the counts of Flowers, Bushes, and Trees respectively. The output for consecutive test cases should follow one after the other without any additional formatting.## sample
1
3
Rose Flower
Tulip Flower
Oak Tree
Total Flowers: 2
Total Bushes: 0
Total Trees: 1
</p>