repeatedly专题

AtCoder Beginner Contest 310 E题 NAND repeatedly

E题:NAND repeatedly 标签:动态规划题意:给定一个长度为 n n n的 01 01 01字符串 A i A_i Ai​,给定规则: 0 ⊼ 0 = 1 , 0 ⊼ 1 = 1 , 1 ⊼ 0 = 1 , 1 ⊼ 1 = 0 0⊼0=1,0⊼1=1,1⊼0=1,1⊼1=0 0⊼0=1,0⊼1=1,1⊼0=1,1⊼1=0。 求 ∑ i = 1 n ∑ j = i n f ( i ,