Ankush08's blog

By Ankush08, history, 3 years ago, In English

I was trying this problem: Boboniu and Bit Operations ( https://codeforces.com/problemset/problem/1395/C ) and in the solution, it suggested finding the answer by brute force that tries all 2^9 numbers. My doubt is, how come just choosing the minimum and of ai and bj not optimal? My solution: https://codeforces.com/contest/1395/submission/109813483 (My approach). Please if someone could help, it would be very much appreciated.

  • Vote: I like it
  • -9
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

the third test case (the one that your program is failing) is pretty short...

8 5
179 261 432 162 82 43 10 38
379 357 202 184 197