UVA 11608 - No Problem UVA • Sep 1, 2020 Problem PDFSolution:#include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define sc scanf #define pf printf #define Pi 2*acos(0.0) using namespace std; int main() { int a[20],b[20],no=0; while(sc("%d",&a[0])) { if(a[0]<0) break; for(int i=1;i<=12;i++) sc("%d",&a[i]); for(int i=0;i<12;i++) sc("%d",&b[i]); pf("Case %d:\n",++no); for(int i=0;i<12;i++) { if(a[i]-b[i]>=0) { a[i+1]=a[i+1]+a[i]-b[i]; pf("No problem! :D\n"); } else { a[i+1]+=a[i]; pf("No problem. :(\n"); } } } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11608/11608.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