摘要: 高斯消元 首先想到状压搜索,但是会T 然后我们考虑到一个开关的最后状态,与它的开始状态与所有与它有关操作的异或和有关 因为每个开关只能操作一次,我们可以把每个开关看作是一个元,这些元之间用异或关系连接起来 cpp include include include include include inc 阅读全文
posted @ 2018-03-13 21:57 Mr_Wolfram 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 高斯消元 注意浮点误差,判断一个浮点数是否为 0 的时候,看他的绝对值与 $10^{ 8}$的关系 cpp include include include include include include using namespace std; double a[20][20], b[20], c[ 阅读全文
posted @ 2018-03-13 19:53 Mr_Wolfram 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 矩阵递推 cpp include include include include define ll long long include using namespace std; int n, m, t, act; int opt[2000], len[100]; char s[20][70]; s 阅读全文
posted @ 2018-03-13 18:51 Mr_Wolfram 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 矩阵快速幂模版 cpp include include include include include include define ll long long using namespace std; const int MOD = (int) 1e9+7; struct Matrix { stat 阅读全文
posted @ 2018-03-13 10:47 Mr_Wolfram 阅读(135) 评论(0) 推荐(0) 编辑