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

Автор Ankush08, история, 4 года назад, По-английски

I was trying this problem: Boboniu and Bit Operations ( https://codeforces.net/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.net/contest/1395/submission/109813483 (My approach). Please if someone could help, it would be very much appreciated.

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

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

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