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

Автор JuanPabloAmezcua, история, 44 часа назад, По-английски

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
Разбор задач Codeforces Round 978 (Div. 2)
  • Проголосовать: нравится
  • +52
  • Проголосовать: не нравится

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

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 часа назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I'm fixing it. Thanks for let us know

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

      Ready!

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

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

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

I love this key takeaways thing

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

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

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

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

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

285980247

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

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

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?