题面:
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).
输入输出
There will be at most 20 test cases. Each test case begins with a line containing four integers n, m, a, b (2<=n<=50, 1<=a<=b<=m<=300000). Each of the following m lines contains a 01 string of length n. The i-th character is 1 if and only if that switch controls the i-th light. The size of the whole input file does not exceed 8MB.
输出描述
For each test case, print the case number, and the number of ways to turn off all the lights.
输入样例
2 4 1 4
01
10
11
00
2 4 3 3
01
10
11
00
6 3 1 3
101001
010110
101001