[알고리즘] 백준 30999 - 민주주의 (C++) [문제 링크] : https://www.acmicpc.net/problem/30999#include using namespace std;int main(){ int N, M, Ans = 0; string S; cin >> N >> M; while(N--){ cin >> S; int cnt = 0; for(char c : S){ if(c == 'O'){ cnt++; } } if(cnt * 2 > M){ Ans++; } } cout 알고리즘 2025.07.12