알고리즘 문제 풀이/1DP_과제(~180615)
171201_1316_그룹 단어 체커
//https://www.acmicpc.net/problem/1316 #include #include using namespace std; int main(){ int N; cin >> N; int cnt=0; for(int i=0; i> word; bool alphbet[26]={0}; bool chk=0; int l=word.size(); for(int j=0; j0 && word[j]!=word[j-1] && alphbet[word[j]-'a']) chk=1; alphbet[word[j]-'a']=1; } if(!chk) cnt++; } cout