링크 : https://www.acmicpc.net/problem/2941
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
string arr[8] = {"c=", "c-", "dz=", "d-", "lj", "nj", "s=", "z="};
int main(){
string s = "";
cin >> s;
int idx = 0;
for(int i = 0; i < 8; i++){
while(true){
idx = s.find(arr[i]);
if(idx != -1) s.replace(idx, arr[i].length(), "!");
else break;
}
}
cout << s.size();
return 0;
}