Блог пользователя brucewayne123

Автор brucewayne123, история, 8 лет назад, По-английски

http://codeforces.com/problemset/problem/543/A hello! i was trying doing this problem in a top down manner.. but i am not able to calculate all the distinct ways.. for example.. if we have v1=1,v2=2,v3-0 then we can add 6 ways to answer by rearranging them but my code adds this just once.. also i am not getting why my recursion is going wrong.. please help me with it.. here is my implementaion without memoising.. https://ideone.com/rUtBD7 i have read the editorial which is explained nicely but it would be nice if someone corrects me in my top down approach.. thanks..

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by brucewayne123 (previous revision, new revision, compare).