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

Автор Lewin, история, 7 лет назад, По-английски

Didn't notice a post from cgy4ever.

Topcoder SRM 718 will happen in ~4 hours.

Tim: 9:00pm EDT Wednesday, July 12, 2017

Calendar: https://www.topcoder.com/community/events/

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

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

I was the author of this round. You can see some short explanations here:

div2
div1
  • »
    »
    7 лет назад, # ^ |
    Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

    Why such a big size in d1-250? I got tle just because I used the map instead of an array...

    Edit. I just checked that |si| <= 1000 would fit within time limit, yet the incorrect O(n^3) solutions would still tle. I really don't get a point in such a huge string size...

    Edit2. Ok — my bad, looks like some O(n^3) solutions might have passed or maybe my test was too weak. Anyway sad that I failed that task. True story is that even though I had O(|s1|*|s2|) solution, I stored a third parameter in the map. After the contest I realized that I do not need this parameter and hence I can use an array, without changing logic...

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

    CircleCity for n ≤ 200 000.

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

      Maybe it's quarterly true, though, I think you should return CircleCity to the problem of Zeptolab's (it means if you solve CircleCity you can solve Zeptolab's if the constraints are same, but not vice versa). Because CircleCity is "placing k teleporters" and after a few ideas it can return the problem of "for given cycle graph you can erase atmost k edges, what is the maximum length of component?". After that it is easy greedy + binary-search because n ≤ 2000, so maybe it is not a main part. And also, Lewin already solved this Zeptolab's problem.

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

Any hints for 1000 pointer?

I could prove that for f(P, k) = C(n, k) we must have difference between adjacent elements of P ≥ n + 1 - k. But it seems it is not a sufficient condition.

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

    Your condition is close, but you also need to consider nonadjacent elements. More specifically you need to look at this expression

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

jiry_2's color is red in yellow..., so mysterious! I think it's a bug, right? (His topcoder rating is 2808)