You are a fan of "Internet of Things"(IoT, 物联网), so you build a nice Internet of Lights and Switches in your huge mansion. Formally, there are n lights and m switches, each switch controls one or more lights, i.e. pressing that switch flips the status of those lights (on->off, off->on).
Initially, all the lights are on. Your task is to count the number of ways to turn off all the lights by pressing some consecutive switches. Each switch should not be pressed more than once. There is only one restriction: the number of switches you pressed should be between a and b (inclusive).
2 4 1 4 01 10 11 00 2 4 3 3 01 10 11 00 6 3 1 3 101001 010110 101001
Case 1: 3 Case 2: 0 Case 3: 2
无
第十一届“蓝狐网络杯”湖南省大学生计算机程序设计竞赛