oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

mewmeow Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

mewmeow.html

Problem Description

Cats love meowing, you know why? THEY JUST DO! In fact, cats are so obsessed with meowing, that males and female cats have different meows, "MEW" and "MEOW" respectively. Throughout a day, Rar the Cat listens to the nearby environment and listens to sounds nearby. Today, he wants to count the number of male and female cats nearby! Each cat will only meow ONCE. Ignore any other sounds other than "MEW" or "MEOW". (case sensitive) Knowing that, the forever alone Rar the Cat wants to find his lifelong female partner. Rar wants to know the number of female cats for every male cat, rounded down. (Since if its too low, he'll just go to IOI City.) If there are no male cats, output "OMG MEEEAHHHH!!!!" because Rar the Cat would be shocked that he is not actually male and that he/she is actually in a female toilet (for cats). (and yes, you need to inform him.)

Input

The input will contain 2 lines. The first line of input will contain an integer N, which indicates the number of sounds he has heard during the day.
The second line of input will contain N strings, indicating the sound he has heard.
The input will be terminated with a newline.

Output

Your output should contain one integer, the number of female cats per male cat. Your output should be terminated with a newline.

Limits

1 <= N <= 1,000,000

Sample Input 1

7
MEOW MEOW WOOF MEW MEW WOOF RAWR

Sample Output 1

1

Sample Input 2

10
MEOW MEOW WOOF RAWR POTATO MEOW MEOW FENG POTATO RAWR

Sample Output 2

OMG MEEEAHHHH!!!!

Tags

Syntax

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
110091s64MBMinimum
2021s64MBMinimum

Judge Compile Command

g++-8 ans.cpp -o mewmeow -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.