문제 링크입니다: https://www.acmicpc.net/problem/2810 간단한 문자열 처리 문제였습니다.핵심은 컵홀더 개수를 구하는 것이 아니라 컵홀더를 쓰는 사람의 수를 구하는 것였습니다! #include #include #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); int N; cin >> N; string s; cin >> s; int cnt = 1; //처음에는 무조건 컵홀더가 있다 int L = 0; for (int i = 0; i < s.length(); i++) if (s[i] == 'S') cnt++; else { L++; if (L == 2) { cnt++; L =..