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

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

Hello everyone!

We are back with another Premier round!

Repovive Premier Round 4 will be held next Sunday.

Premier rounds are currently the highest level among our contest series. We hope you enjoy it!

The contest is rated for everyone.

See you on the leaderboard!

UPD1: Congratulations to the top participants:

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

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

How was the previous Premier?

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

As a writer, I'd be glad to see you on the scoreboard on Sunday!

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

Looks interesting.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

As a tester, that's one the GOATs.

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

Difficult problemset. I was able to solve only 2 problems. Looking forward to next Sunday’s Career Starter Round.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

I'm getting a segfault in E but it's not MLE, I can't find any point where my code should segfault and sanitizers say everything's fine. Do you perhaps have a low default stack setting?

  • »
    »
    6 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +21 Проголосовать: не нравится

    I can confirm that replacing the recursive dfs with this

    vector<int> order = {0};
    vector<int> par(n);
    for (int i = 0; i < n; ++i) {
        int v = order[i];
        for (int x : a[v]) {
            if (x != par[v]) {
                par[x] = v;
                order.push_back(x);
            }
        }
    }
    reverse(all(order));
    for (int v : order) {
        dfs(v, par[v]);
    }
    

    (and of course remove the recursive call from dfs itself) turned segfault on 31 to ac

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

      Yep, already tried it myself. It's not something people expect on an online judge these days...

      There may be a case for fixing the judging system and doing a rejudge here. Purely because it's a new site and I really doubt making people run into low stack was intended rather than an oversight.

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

Where will the editorial get posted? I can't find any link on the site.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

The F problem is almost identical to a problem that has appeared on AtCoder.

https://atcoder.jp/contests/arc154/tasks/arc154_e

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

    That was completely accidental.

    The original version of the problem was actually different: the operation was to shift a chosen subset. Later, we changed the operation, and the problem ended up having a cleaner solution with a better ordering argument.