|
|
back to boardWHAT IS WRONG?????? Posted by *HTL* 26 Apr 2010 22:29 #include <iostream> #include <cmath> #include <algorithm> using namespace std; int max(int a,int b) { if(a>b) { return a; } else { return b; } } int main() { int d,e,f,h,s,i; long int dp,ep,m; cin>>d>>e>>f>>dp>>ep>>h; s=(f-d)+(f-e); m=pow(2,f-1); for(i=1;i<=f-max(d,e);i++) { if((dp>m) && (ep>m)) { break; } if(dp>m) { dp-=m; dp-=m; } } s=s-2; m/=2; if(s<=h) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } return 0; } |
|
|