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

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

I hope you enjoyed the contest!

Contest link

Rating Predictions and Tags for the Problem

Tutorial for the Problems


A. Game is Game

Author: Proelectro444, ok12 Solution: ok12

Solution

B. Hakurei Shrine's Purification Ritual

Author: ok12 Solution: ok12

Solution

C. Permutation Game

Author: ok12 Solution: ok12

Solution

D. Path Blow-up?

Author: Soumil69 Solution: Soumil69

Solution

E. Coffee Date of MEX

Author: ok12 Solution: Soumil69, ok12, dpsvoyager.16

Solution

F. Wordleforces

Author: Arnav_Singhal1 Solution: Arnav_Singhal1

Solution

G. Adaptive Guessing

Author: GeoMetrix123 Solution: GeoMetrix123

Solution

H. Mirror Check Failed

Author: Soumil69 Solution: Soumil69

Solution

I. Hamming Hamsters

Author: nem Solution: Soumil69, VectorVirtuoso

Solution

J. Shhhh... Its a Ghost

Author: ok12 Solution: ok12

Solution

K. Lost in Signals

Author: VectorVirtuoso Solution: Soumil69

Solution

L. Metro Network

Author: FrostBlaze Solution:Soumil69

Solution

M. Mathy sequence

Author: rock0fages Solution: rock0fages

Solution

N. Easy Mex Problem

Author: Soumil69 Solution: Soumil69

Solution

We really hope everyone enjoyed the contest and thanks to ANCC Team for making the contest successful and supporting us and guiding us throughout the preparation.

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

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

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

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

why does in problem F it says an ordered string of length m if permutations were considered, i am not sure, but it might be that i am not able to understand the problem or that there is typo in problem, which is the case?

Thx for the contest, though.

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

    No typo.

    The secret is an ordered string (since you must match it exactly to get a “Correct” verdict). However, if your guess is wrong, the judge only returns the multiset intersection (counts of common letters) without positions.

    So you’re trying to find an ordered string, but you only get the multiset information until the correct guess.

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

Great contest, I particularly enjoyed problem N. I derived $$$f(u) = \frac{(size(u) - 1)!}{size(v_1)! \times size(v_2)!\times .. \times size(v_m)!} \times f(v_1) \times f(v_2) \times .. \times f(v_m)$$$ and implemented it directly; it just used a bit of extra memory. 364963561

One minor suggestion: Problem B’s statement changed from unordered to ordered pairs mid-contest. It would have been helpful to have a formal announcement for that change. Overall, really enjoyed the contest!

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

Edit: The solution turned out to be wrong

An alternative solution to G:

While n>3, we can query {n , n-1 , n+1}, if all these are 0 then it implies that X in range [1,n-1]
When n==3, we can ask the following queries: {2, 4, 3, 2} and we will determine X.

The total number of queries is 3*(n-3) + 4

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

Problem N can be solved more easily.
Assume the root (say node $$$1$$$) has label $$$0$$$.
Then having a connected component with $$$\text{mex}=k$$$ for all $$$k$$$ is equivalent to $$$\text{label}(u) \gt \text{label}(\mathrm{par}(u))$$$. This is nothing but number of topo-sorts of a tree. So, we just need to find number of topo-sorts of the tree considering each node $$$u$$$ as the root.

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

For the question A. Game is Game, Consider the test case 5 5 5 4 4 4

here Alice can get 5 and Bob 4 as final score, yet the solutions accepted shows Alice gets 9 and Bob 0. If Bob played optimally understanding the maximum he can get is 4, he can get 4.

  1. Alice take a 5.
  2. Bob take a 5.
  3. Alice take the last 5. Alice have 5 points.
  4. Bob take the 4.
  5. Alice take the 4.
  6. Bob take the 4. Bob get 4 points.

Final score : Alice — 5 Bob — 4

Am I missing something here?

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

K=n construction for E, if anyone wants. 365116634

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

In problem F while intuitively it's correct is there a proof for why strings without all distinct characters will not be the worst case?

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

    First, you need at least n/m queries for checking which all letters are present in the word. Then assume you got k(<n) distinct letters, so the number of queries you need to find the frequency of each letter is k (you can do this by querying k-1 single characters and rest equal to the remaining one character) Then say the frequencies are $$$a_1, a_2 \dots ,a_k$$$, then you need to query all possible permutations of these letters which takes $$${k!}/{{a_1}!{a_2}!\dots{a_k}!}$$$ , so the maximum number of queries you can get in such case is n/m + k + $$${k!}/{{a_1}!{a_2}!\dots{a_k}!}$$$. This expression is always less than n/m + m! which is the number of queries required when all characters are distinct. (Please note that in the explanantion I have not taken care of ceil or floor of n/m. I have only given a brief reasoning of why the solution in editorial works.

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

Guys, support our flash mob and go to the "банда мопсоу" organization, and also put this picture as your avatar. Thanks to everyone who took part