줄임말
[백준 20191번-C++] 줄임말
http://acmicpc.net/problem/20191 {코드} #include #include #include using namespace std; int solution() { string S, T; cin >> S; cin >> T; vector next(26); for (int i = 0; i < T.length(); i++) { next[T[i]-'a'].push_back(i); } int chkCnt = 0, chkIdx; for (int i = 0; i < 26; i++) { if (!next[i].empty()) {chkCnt++; chkIdx = i;} } if (chkCnt == 1 && T[chkIdx] == S[0]) return (S.length()+T.length()-1)/T..