UVA 11661 - Burger Time? UVA • Sep 1, 2020 Problem PDFSolution:#include #include char a[2000010]; int main() { int n,i,d,min,f; while(scanf("%d",&n)==1) { if(n==0) break; scanf("%s",a); f=0; d=1; min=2000010; for(i=0;id) min=d; i--; d=1; break; } else if(a[i]=='Z') { min=0; f=1; break; } } } else if(a[i]=='D') { i++; for(i=i;id) min=d; i--; d=1; break; } else if(a[i]=='Z') { min=0; f=1; break; } } } else continue; } printf("%d\n",min); } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11661/11661.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