pekempey's blog

998244853

Entries from 2019-08-25 to 1 day

Japanese Student Championship 2019 Qualification F - Candy Retribution

https://atcoder.jp/contests/jsc2019-qual/tasks/jsc2019_qual_f Before explaining the solution, we first explain the four typical problems. These often appears in various counting problems. Problem 1 How many are there N non-negative integer…

Japanese Student Championship 2019 Qualification E - Card Collector

https://atcoder.jp/contests/jsc2019-qual/tasks/jsc2019_qual_eWe should calculate not the maximum spanning forest but the maximum pseudo forest. K - 種類数 β uses similar property. We know we can swap edges in any tree, and we can also swap…

Japanese Student Championship 2019 Qualification C - Cell Inversion

https://atcoder.jp/contests/jsc2019-qual/tasks/jsc2019_qual_cLooking at elements from left to right, we'll decide to open or close an interval. We can determine which operation we should do by the parity of the number of intervals currentl…