AmShZ's blog

By AmShZ, 4 months ago, In English

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:

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
4 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How was the previous Premier?

»
4 months ago, hide # |
Rev. 2  
Vote: I like it +2 Vote: I do not like it

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

»
4 months ago, hide # |
 
Vote: I like it +18 Vote: I do not like it

Looks interesting.

»
4 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

As a tester, that's one the GOATs.

»
4 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
4 months ago, hide # |
 
Vote: I like it +20 Vote: I do not like it

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?

  • »
    »
    4 months ago, hide # ^ |
     
    Vote: I like it +21 Vote: I do not like it

    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

    • »
      »
      »
      4 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      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.

»
4 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
4 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

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

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

  • »
    »
    4 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    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.