CF 2174F - Mosaic Tree

Rating: 2800
Tags: combinatorics, dp, fft, math, trees
Solve time: 2m 32s
Verified: no

Solution

Working