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

Автор darkshadows, 6 лет назад, По-английски

Throughout the year, Google Code Jam hosts online Kickstart rounds to give participants the opportunity to develop their coding skills, get acquainted with Code Jam’s competition arena, and get a glimpse into the programming skills needed for a technical career at Google.

Each Kickstart round gives participants 3 hours to solve challenging, algorithmic problems developed by Google engineers. Participating is a fun way to grow your coding skills—and potentially explore opportunities at Google.

Inviting you to solve some fun and interesting problems on Saturday, April 21, 2018 23:00 UTC.

Dashboard can be accessed here during the contest. Problem analysis will be published soon after the contest.

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

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

Notif: It's on!

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

How to solve B large?

  • »
    »
    6 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +10 Проголосовать: не нравится

    Calculate dp: f[pos][mask] is a number of ways to construct a correct binary starting from position pos and ending at the end of the string, where first bits will be mask, and all constraints are satisfied.

    Number of bits in mask should be equal maximal difference between Bi and Ai, so 16 should be ok.

    Transitions: select which bit 0 or 1 you want to add to the position pos - 1, and check that all constraints starting at the position pos - 1 are satisfied.

    You can use long double, but I code it in python.

    Given this dp, you can easily construct needed string.

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

How to solve C?

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

    C: We will count the triples where there are no squares passing through all of them.

    It isn't hard to show that (x1, y1), (x2, y2), (x3, y3) is such a pair if and only if (x1 < x2 < x3 and y1 < y2 < y3) or (x1 < x2 < x3 and y1 > y2 > y3) under some permutation.

    Therefore, it reduces to calculating the number of points in each quadrant if we regard each of the N points as the origin. This can be done by a simple segment tree. (by going from left to right)

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

Problem analysis is uploaded.

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

I have a small problem : My name appears on the ranklist (rank 58) for me and all people who have added me as friend(it appears in both friends list and in the position of rank 58 in general ranklist) but it does not appear when I am not signed in or for people who have not added me as friend.

I observed this immediately after the contest ended but I thought it would rectify with time but it didn't.

My handle is the same (sdssudhu) for kickstart.

Can anybody help me with this ??

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

Can someone explain the 3D digit-dp solution for problem A?