알고리즘 문제 풀이/1DP_과제(~180615)
2017.12.01
//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
알고리즘 문제 풀이/1DP_과제(~180615)
2017.11.27
//https://www.acmicpc.net/problem/2743 #include using namespace std; int main(){ char str[101]; cin >> str; for(int i=0 ;i s; int l=s.size(); cout > str; int l=strlen(str); cout
알고리즘 문제 풀이/1DP_과제(~180615)
2017.11.26
//https://www.acmicpc.net/problem/1032 #include #include using namespace std; int main(){ string str1, str2; int N; cin >> N >> str1; int l=str1.size(); bool chk[51]={1,}; if(N==1) {cout str2; for(int j=0; j
알고리즘 문제 풀이/1DP_과제(~180615)
2017.11.26
//https://www.acmicpc.net/problem/10808 #include #include using namespace std; int main(){ int alphabet[26]; for(int i=0; i> s; int l=s.size(); for(int i=0; i