#agc026d. [agc026_d]Histogram Coloring

[agc026_d]Histogram Coloring

给定 NN 列的网格,每列高为 hih_i,将每个格子染色成红色或蓝色,使得每个 2×22\times2 的区域都恰好有两个蓝格子和两个红格子,求方案数