Democracy
Time limit0.5sMemory limit1024 MB
Count the candidates that get more than half of the M votes in favor, where each candidate's votes are given as a string of O and X.
- Level
Easy2 of 10
- Topics
- Implementation, String
- Solved
- No attempts yet
Problem
The monthly Hyangyu gathering decides which problem candidates get used by majority vote. Each of the candidates is judged by committee members, and each member votes in favor or against. A candidate that receives a majority of votes in favor is included. is always odd.
Given the votes of the committee members on each candidate, find the number of problems that will be included.
Input
The first line contains the number of candidates and the number of committee members , separated by a space. (; ; is odd)
Each of the next lines contains a string of length showing the committee's votes on one candidate. The -th character is O if the -th member votes in favor, and X otherwise.
Output
Print the number of problems that will be included.