UVA 12243 - Flowers Flourish from France UVA • Sep 1, 2020 Problem PDFSolution:#include #include #include #include #include #include #include #include #include #include using namespace std; int main() { char s[2000]; char c; while(gets(s)) { if(!strcmp(s,"*")) break; int p=0,k=0; for(int i=0;s[i]!='\0';i++) { if(s[i]>='A'&&s[i]<='Z') s[i]=s[i]+32; if(s[i]==' ') p++; } c=s[0]; int f=0; for(int i=0;s[i]!='\0';i++) { if(s[i]==' ') { if(c==s[i+1]) k++; } } if(p==k){ printf("Y\n"); continue; } else{ printf("N\n"); continue; } } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/12243/12243.cpp Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read