UVA 591 - Box of Bricks UVA • Sep 1, 2020 Problem PDFSolution:#include int main() { int n,i,a[100],t=1,sum,c; while(scanf("%d",&n)==1 && n!=0) { sum=0; c=0; for(i=0;isum) c=c+(a[i]-sum); printf("Set #%d\nThe minimum number of moves is %d.\n\n",t++,c); } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/591/591.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