#Lutece3205. 线性代数
线性代数
Migrated from Lutece 3205 线性代数
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Tag: 容斥,dp
对于非空非负数集 ,称数集 是 的一组基当且仅当对于 中的每个数 ,存在 的一个子集满足这个子集的异或和等于 。
同时定义 是 的一个最小基当且仅当 是 的基中元素个数最少的。
现在给定数集 和一个正整数 ,求有多少 的子集 满足 是 的一个最小基,对 取模。
Input
和 以二进制形式给出,高位在前,可能有前导零。
第一行两个整数 ,分别表示数集 的大小和二进制数的位数。
接下来 行,每行一个长为 的 串表示 中的数。
最后一行一个长为 的 串表示 。
Output
一行一个整数表示答案。
Samples
4 4
0001
0010
0100
1000
1101
7364
3 2
00
00
00
11
0
3 10
1111100110
0011110100
0101100001
1110000001
38
Constraints
Resources
2024 UESTC ICPC Training for Math