Tuesday, January 24, 2012

Billboard problem Resolved – Facebook Hacker Cup 2012

Please See updated information from

http://www.totodotnet.net/2012/01/24/billboard-problem-resolved-facebook-hacker-cup-2012

Yes, I was wrong about the first case and the 7th case. I updated some information from the above link.

5 comments:

  1. Replies
    1. Yes, you are right, it should be 60.

      Delete
  2. The first case was:
    "100 50 wbqFRPHyoUqyBhZrOlGS GfU EZTb D Rc R BoZfX Nog f n"

    and according to your answer:
    Case #1: 30

    the first word "wbqFRPHyoUqyBhZrOlGS", will use:
    lenght("wbqFRPHyoUqyBhZrOlGS") = 20
    20 * 30 = 600" width - 600" > 100"

    My answer for case 1 is 5 by the way

    Manually check each case and probably you will see that your output is wrong.

    ReplyDelete
    Replies
    1. I think we might have a different input file? From my input file, the first case is "900 60 hacker cup 2013", you can view it from: https://raw.github.com/TonnyXu/BillboardProblem-FacebookHackerCup2012/master/billboards.txt

      Delete
    2. my bad, they are different ;D srry

      Me:
      20
      100 50 wbqFRPHyoUqyBhZrOlGS GfU EZTb D Rc R BoZfX Nog f n
      (...)

      You:
      20
      900 60 hacker cup 2013
      (...)

      Delete