![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
异或方程组
文章平均质量分 76
空灰冰魂
=NULL
展开
-
【POJ1830】开关问题 高斯消元求自由元
题意:中文题。 题解: 呃,求自由元个数,然后输出1 如果无解输出那个题中给的串。 诶网上代码真不可看,我绝望了决定照自己想法随便写写。 然后49行没压行搞过去了。 网上全是100行+什么心态。 然后还复杂难看。 代码: #include #include #include #include #include #define N 40 #原创 2015-02-04 09:55:23 · 2924 阅读 · 0 评论 -
【POJ1222】EXTENDED LIGHTS OUT 高斯消元、解异或方程组
题意: 多组数据、 有个5*6的图,然后你要对某些位置进行操作,使得最后灯的状态如图。 操作:这个灯位置的上下左右以及自己这五盏灯状态都取反。 然后输出操作。 说实话什么亮灭什么我全都没考虑。 直接瞎写一遍就PE了,改改就AC了。 高斯消元解异或方程组: 跟正常高斯消元一样,只不过拿一个式子A消式子B的时候,是用异或而不是加减乘除。 代码: #inclu原创 2015-02-04 08:31:15 · 1829 阅读 · 0 评论 -
【POJ1681】Painter's Problem 高斯消元,求最小∑系数的异或方程组
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 题意: 多组数据、 有个n*n的正方形,然后你要对某些位置进行操作,使得最后灯的状态都变成y。 操作:这个灯位置的上下左右以及自己这五盏灯状态都取反。 然后求最小操作次数。 -+-+-+-+-+-+-+-+-+-+-+-+-+-+原创 2015-02-04 11:09:03 · 1554 阅读 · 0 评论 -
【BZOJ3503】【Cqoi2014】和谐矩阵 高斯消元,解异或方程组
题解: 随便搞搞就好。 自由元全当成1就好了么~~~ 代码: #include #include #include #include #define P 45 #define N 1800 using namespace std; const int dx[]={0,0,0,1,-1}; const int dy[]={0,1,-1,0,0}; int a[N][N],x原创 2015-02-10 10:14:32 · 1961 阅读 · 1 评论 -
【BZOJ2466】【中山市选2009】树 高斯消元解异或方程组
题解: 参照此题解,也是我写的,俩题一样。 【POJ1681】Painter’s Problem 高斯消元,求最小∑系数的异或方程组 代码: #include #include #include #include #include #define N 105 #define inf 0x3f3f3f3f using namespace std; bool a[N][N],x原创 2015-03-17 22:44:16 · 1393 阅读 · 0 评论