omsincoconut's blog

By omsincoconut, 4 months ago, In English

2179A - Blackslex and Password

Author: IceBorworntat

Hint 1
Solution
Implementation (Python)

2179B - Blackslex and Showering

Author: spycoderyt

Hint 1
Solution
Implementation (C++)

2179C - Blackslex and Number Theory

Author: omsincoconut

Hint 1
Hint 2
Hint 3
Solution
Implementation (Python)

2179D - Blackslex and Penguin Civilization

Author: omsincoconut

Hint 1
Hint 2
Hint 3
Solution
Implementation (Python)

2179E - Blackslex and Girls

Author: spycoderyt

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Implementation (C++)

2179F - Blackslex and Another RGB Walking

Author: omsincoconut

Hint 1
Hint 2
Hint 3
Solution
Implementation (C++)

2179G - Blackslex and Penguin Migration

Author: omsincoconut

Hint 1
Hint 2
Hint 3
Solution
Implementation (C++)
Challenge

2179H - Blackslex and Plants

Author: NortGlG

Hint 1
Solution
Implementation (C++)

Full text and comments »

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

By omsincoconut, 11 months ago, In English

Statement

Official Solution

I saw multiple solutions of this task and wanted to share mine, which is suboptimal but can still pass.

My Solution

First, we use $$$H+W$$$ OR gates to connect each row and column together.

Now, we will find the horizontal and vertical distance between the two points then add it up. If we check all pairs of rows and columns, we will use $$$\mathcal{O}(H^2 + W^2)$$$ gates which will solve $$$H, W \leq 30$$$ and will use just a bit too much for $$$H, W \leq 100$$$.

Consider the problem in one dimension. Rather than trying to create a circuit for each possible distance, we will find the binary representation of the distance. For each bit $$$b$$$, we can check if the distance in some direction has the $$$b$$$-th bit on. This is doable by considering OR(AND($$$i$$$, OR($$$i+k$$$))) for all $$$i, k$$$ that $$$k$$$ has the $$$b$$$-th bit on . This uses $$$\mathcal{O}(H \log H + W \log W)$$$ gates.

Now that we have the horizontal and vertical distance in binary, we can implement a binary adder circuit, then check if the resulting value is $$$K$$$ or not.

Code (C++)

Full text and comments »

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

By omsincoconut, 13 months ago, In English

I hope everyone enjoyed the tasks, and thank you for participating.

Thank you to the coordinators and testers for suggesting solutions and modifications to the tasks, as I alone wouldn't be able to solve my own tasks or make it to how it is right now. Also thank you to them for dealing with me since July.

Please tell me in the comments if the editorial is written incorrectly or unintelligibly somewhere. I'm not the best at phrasing some things, and would appreciate amendments to the editorial.

2078A - Final Verdict

Hint
Solution

2078B - Vicious Labyrinth

Hint 1
Hint 2
Solution
Extra

2077A - Breach of Faith

Hint 1
Hint 2
Solution
Note

2078D - Scammy Game Ad

Hint 1
Hint 2
Hint 3
Solution 1
Solution 2
Note

2077B - Finding OR Sum

Hint 1
Hint 2
Solution

2077C - Binary Subsequence Value Sum

Hint 1
Hint 2
Hint 3
Solution

2077D - Maximum Polygon

Hint 1
Hint 2
Solution

2077E - Another Folding Strip

Hint 1
Hint 2
Solution

2077F - AND x OR

Hint 1
Hint 2
Solution

2077G - RGB Walking

Hint 1
Hint 2
Hint 3
Solution

Some ending notes

Rating predictions
A small (?) story of this contest.
About Arcaea and the soundtracks

Full text and comments »

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

By omsincoconut, 14 months ago, In English

Hello, Codeforces!

I'm glad to invite everyone to Codeforces Round 1008 (Div. 1), Codeforces Round 1008 (Div. 2), which will be held on Mar/10/2025 17:45 (Moscow time).

You will be offered $$$7$$$ problems in both divisions 1 and 2, and you will be given $$$2$$$ hours and $$$30$$$ minutes to solve them.

Both divisions contain at least one interactive problem(s). Please look up the guide if you are unfamiliar with them.

I'd like to give my utmost thanks to

I hope everyone will indulge in the tasks blissfully.

Score distribution

Division 1: $$$500-1000-1500-2250-2250-2500-3000$$$

Division 2: $$$500-750-1250-1750-2000-2750-3500$$$

Congratulations to the winners!

Division 1

  1. jiangly

  2. Ormlis

  3. Um_nik

  4. tourist

  5. ksun48

Division 2

  1. a1048576

  2. SussykinWantsNatalia

  3. DanielAnker

  4. Manasvi

  5. hungpc1577

Editorial

Full text and comments »

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