#include<bits/stdc++.h>
#define i64 long long
#define mx(a,b,c) max(a,max(b,c))
#define mn(a,b,c) min(a,min(b,c))
#define eef else if
#define ff(i,s,e) for(int i=(s); i<e; i++)
#define ff2(i,s,e) for(int i=(s); i>=e; i--)
#define sf scanf
#define pf printf
#define dbug(x) cout<<"x = "<<x<<endl
#define newl cout<<"\n"
#define putcase cout<<"Case "<<++cse<<":";
using namespace std;
int main()
{
int cse=0;
int p , a[13],b[12];
while(cin>>p){
int sum=p;
if(p<0)
break;
ff(i,0,12)
cin>>a[i];
ff(i,0,12)
cin>>b[i];
putcase;
newl;
ff(i,0,12){
if(sum>=b[i]){
cout<<"No problem! :D\n";
sum-=b[i];
}
else
cout<<"No problem. :(\n";
sum+=a[i];
}
}
return 0;
}
#define i64 long long
#define mx(a,b,c) max(a,max(b,c))
#define mn(a,b,c) min(a,min(b,c))
#define eef else if
#define ff(i,s,e) for(int i=(s); i<e; i++)
#define ff2(i,s,e) for(int i=(s); i>=e; i--)
#define sf scanf
#define pf printf
#define dbug(x) cout<<"x = "<<x<<endl
#define newl cout<<"\n"
#define putcase cout<<"Case "<<++cse<<":";
using namespace std;
int main()
{
int cse=0;
int p , a[13],b[12];
while(cin>>p){
int sum=p;
if(p<0)
break;
ff(i,0,12)
cin>>a[i];
ff(i,0,12)
cin>>b[i];
putcase;
newl;
ff(i,0,12){
if(sum>=b[i]){
cout<<"No problem! :D\n";
sum-=b[i];
}
else
cout<<"No problem. :(\n";
sum+=a[i];
}
}
return 0;
}
No comments:
Post a Comment