4659번 - 비밀번호 발음하기
사실 이겁니다.
#include
using namespace std;
map mp;
int isContainingVowel;
string str;
int isVowel(char c){
if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u'){
return 1;
}else{
return 0;
}
}
int isThreeCons(string s){
for(int i=0; i> str){
if(str == "end"){
break;
}
isContainingVowel=0;
for(auto &it : mp){
it.second = 0;
}
if(!isThreeCons(str) && !isCons(str) && isContainingVowel){
cout << "<" << str << "> is acceptable.\n";
}else{
cout << "<" << str << "> is not acceptable.\n";
}
}
return 0;
}
댓글을 작성하려면 로그인해야 합니다.
woogi22 2년 전
반례를 못찾겠습니다. 코드가 좀 더럽지만 어디가 틀렸을까요?