AtCoder Grand Contest 007 review

Link AGC 007 top page Editorial I felt you need more invetiveness/creativeness in this contest, and it was difficult.  A – Shik and Stone Problem Compared to ARC (regular contest), it is slightly difficult even from problem A. The most elegant solution is to just check the number of ‘#’ is equal to \(W+H-1\) or not as explained in Editorial. However, I could not notice it so I checked that we can actually go using only right or down or not.

  B – Construct Sequences Problem You need to come up with one construction method which satisfies the 3 conditions. Editorial way is much more easier than below […]

Continue reading →

AtCoder Regular Contest 063 review

Link ARC 063 top page Editorial C – 一次元リバーシ / 1D Reversi Problem  

D – 高橋君と見えざる手 / An Invisible Hand Problem I didn’t notice that there is a restriction that each \(A_i \) is different. So it took time for implementation.

  E – 木と整数 / Integers on a Tree Problem Follow editorial.

                     

Continue reading →

AtCoder Regular Contest 062 review

Link ARC 062 top page Editorial C – AtCoDeerくんと選挙速報 / AtCoDeer and Election Report Problem

  D – AtCoDeerくんと変なじゃんけん / AtCoDeer and Rock-Paper Problem

  E – AtCoDeerくんと立方体づくり / Building Cubes with AtCoDeer Problem   Implementation based on Editorial.

     

Continue reading →

AtCoder Regular Contest 060 review

Link ARC 060 top page Editorial C: Tak and Cards – 高橋君とカード Dynamic programming I could come up only full search using bit operation during the contest. But it can be solved by DP. Below is full score (Section 3.3 of editorial) implementation.

  D: Digit Sum – 桁和 I came up different approach from editorial. Let \(a_i\) be \(i\)-th digit with base \(b\). Then, $$ n = \sum_i b^i a_i  $$ $$ s = f(b, n) = \sum_i a_i  $$ applies. If we subtract these equation, we obtain $$ n – s = \sum_i (b^i – 1) a_i  $$ Both side should be integer, and right hand side […]

Continue reading →