Advertisement
Morass

Possibilities

Jan 24th, 2016
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1.     if(c)w=min(w,1+dyn(n-1,b,c-1));
  2.     if(c&&u>2)w=min(w,4+dyn(n-1,b+1,c-1));
  3.     if(b>1)w=min(w,2+dyn(n-1,b-2,c));
  4.     if(u>7)w=min(w,8+dyn(n-1,b,c));
  5.     if(b&&u>2)w=min(w,4+dyn(n-1,b-1,c));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement