UVA 12543 - Longest Word UVA • Sep 1, 2020 Problem PDFSolution:#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define sc scanf #define pf printf #define Pi 2*acos(0.0) int main() { char s[1000005],a[1000005]; int max=1; while(sc("%s",s)) { if(!strcmp(s,"E-N-D")) break; int l=strlen(s); int c=0; for(int i=0;i='a'&&s[i]<='z'||s[i]>='A'&&s[i]<='Z'||s[i]=='-') continue; else c++; } l=l-c; if(max='A'&&a[i]<='Z') pf("%c",a[i]+32); else if(a[i]>='a'&&a[i]<='z'||a[i]=='-') pf("%c",a[i]); } pf("\n"); return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/12543/12543.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