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

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

The 2018 North Central North America ACM-ICPC Regional Programming Contest is tomorrow, Saturday November 3rd, 4pm UTC. There is an open division for anyone interested in competing at: https://open.kattis.com/contests/ncna18open. The official scoreboard will be at https://ncna18.kattis.com/.

As there is no way to request or issue clarifications in the open division of Kattis, please comment here if any questions arise.

The problem set was created by myself, Alexander Scheel, xennygrimmato, NibNalin, vlyubin, Joshua Guerin, Kathleen Ericson, David Poplawski, and erena. Additional thanks to asdoc, xiaowuc1, and y0105w49 for problem solutions.

EDIT: This is happening in about three hours.

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

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

Auto comment: topic has been updated by brycesandlund (previous revision, new revision, compare).

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

This year’s problem set is nice! Though I got no idea for the two hardest problems.

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

Was there a solution for D not based on max flow? Also ideas for the two hardest ones?

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

    You can actually observe that from a day to the next day, if for any airport i, the number of people currently at airport i is larger than or equal to the sum of the number of people that the flights leaving airport i requires, then that day is optimal. So you can just do simulation for each day in this way.

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

    Pokegene: Sort the genome strings and create a tree. Reduce the problem to a series of LCA queries.

    New Salaries: Come up with a general formula for [Li, Ri], [Lj, Rj] where Li ≤ Lj ≤ Ri ≤ Rj (the case where Ri ≤ Lj instead is easy). For a fixed i,  you can compute the sum of expected damages over all relevant j with prefix sum queries.

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

    More details about Pokegene:

    If you sort the set of strings in a query, the possible answer ancestors are a prefix of L consecutive strings from this set.

    With this observation, you can see that the solution is the sum of the length of the LCPs(longest common prefix) of L sized windows of the sorted set. Now, there are multiple ways to calculate the LCP length for each window, using LCA in trie, hashing+binary search, auxiliary tree etc.

    For the LCA in trie approach, notice that the LCP of strings indexed (x, ... x + L - 1) can be found from the LCA of the x th and x + L - 1 th string end nodes in the trie.

    There are a couple of edge cases to figure out about strings that are proper prefixes of other strings in the set, but they are relatively trivial.

    brycesandlund and I expected this to get more ACs, but I hope everyone still enjoyed the problem. :)

    EDIT: This was my first time problem-setting, so let me know if you have any comments or feedback about the problem.

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

How to solve Problem G Tima goes to Xentopia?

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

    Dijkstra! Make a graph with k1*k2 layers. Add an edge from one layer to another to take a red or blue edge. White edges keep you in the same layer.

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

    Alternatively, dijkstra with state[i][j][k] = t being the min time it takes to arrive at i after using j red and k blue edges.

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

When will the solution slides be posted?

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

    You know, I wasn’t sure people really looked at them last year so I wasn’t sure I was going to make them at all this year. You’re not the first person to ask, though, so I am going to put some solution sketches online. I think I’m going to make them more like what’s been done for the world finals. I can get get them up tomorrow.