Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean isPoss(int a, int b, int c, int d){
- boolean result = false;
- if (c < a || b < d){
- return false;
- }
- if (a == c && b == d){
- result = true;
- }
- if (d > c){
- result = result || isPoss(a,b,c,d-c);
- }
- if (c > d){
- result = result || isPoss(a,b,c-d,d);
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement