Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public static boolean isPoss(int a, int b, int c, int d){
  2. boolean result = false;
  3. if (c < a || b < d){
  4. return false;
  5. }
  6. if (a == c && b == d){
  7. result = true;
  8. }
  9. if (d > c){
  10. result = result || isPoss(a,b,c,d-c);
  11. }
  12. if (c > d){
  13. result = result || isPoss(a,b,c-d,d);
  14. }
  15.  
  16. return result;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement