JuanPabloAmezcua's blog

By JuanPabloAmezcua, history, 44 hours ago, In English

Hola Codeforces community! Sorry for the delay, we were solving some details of our national contest. We hope you enjoyed and learned a lot from this contest, we made it with much love. Our team worked day and night these last days to make sure you had a valuable experience :)). If you have any doubts about the editorial, please let us know in the comments, we are happy to help you. The editorial was prepared by jampm and me. Btw, best meme of the round.

2022A - Bus to Pénjamo

Step 1
Step 2
Step 3
Code:
Key Takeaway

2022B - Kar Salesman

Step 1
Step 2
Step 3
Alternative Solution
Intuitive proof
Formal Proof by Errorgorn
Code:
Key Takeaway

2022C - Gerrymandering

Step 1
Step 2:
Step 3:
Step 4:
Code:
Key Takeaways

2022D1 - Asesino (Easy Version)

Hint 1
Hint 2
Hint 3
Solution to D1
Code:

2022D2 - Asesino (Hard Version)

Hint 4
Hint 5
Hint 6
Hint 7
Hint 8
Hint 9
Solution
Code by Marckess:
Bonus
Main takeaways

2022E1 - Billetes MX (Easy Version)

Hint 1
Hint 2
Hint 4
Hint 5
Hint 6
Hint 7
Hint 8
Answer to hint 8
Hint 9
Answer to hint 9
Solution
Code:

2022E2 - Billetes MX (Hard Version)

Please read the solution to E1 beforehand, as well as all the hints.

Solution 1
Solution 2
Code by Marckess:
Bonus
Main takeaways
  • Vote: I like it
  • +52
  • Vote: I do not like it

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

The solution code for Problem C shows "you are not allowed to view this page" error. If it opens for anyone, can they share the code in comments!

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

    I'm fixing it. Thanks for let us know

    • »
      »
      »
      3 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Ready!

»
4 hours ago, # |
  Vote: I like it +1 Vote: I do not like it

How to use B's Alternative Solution(binary search) to solve this problem?

»
3 hours ago, # |
  Vote: I like it +4 Vote: I do not like it

I love this key takeaways thing

»
3 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

For E1/E2 about checking the validity of the grid , why is the following statement true.

We can deduce that if there is a cycle with xor of weights distinct to 0 in this graph, there would be a contradiction, and arrays X and Y can't exist

»
81 minute(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

Why this greedy approach for Problem-B gives WA on test2. 285737349

»
53 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

285980247

Why it is giving WA on test case 2. For Problem B

»
1 minute ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

In D1, We know that if ask(i,j)!=ask(j,i) then one of them must be the impostor, However, I'm slightly confused as I queried on pairs that are distinct (i.e 1,n 2,n-1 and so on). Since the grader was adaptive, I declared j as impostor if ask(i,j)!=ask(j,i), since it's possible for any of them to be the impostor and since the queries are independent of the previous ones.

Why do we need to verify again which one is the impostor once we get the above condition?