hackersarkar12's blog

By hackersarkar12, history, 4 years ago, In English

Im unable to understand the solution logic of codeforces div2 664 problem c. http://codeforces.net/contest/1395/problem/C

  • Vote: I like it
  • +13
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Brute force the solution since 2^9 = 512. Test every a & b with each of these numbers to see if they match with the number, and pick the smallest of these numbers.

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it
Solution

Hope that will help you!

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Anyone can help how this problem can be done by DP?