![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_高斯消元法
文章平均质量分 72
thatTime
这个作者很懒,什么都没留下…
展开
-
poj 1830 开关问题
高斯消元解异或方程组 具体的可以参照大牛的博客 http://blog.csdn.net/cjoilmd/article/details/6449566 #include #include #include using namespace std; int a[35][35], str[35], end[35]; int n; int gauss() { int i, j, k原创 2013-08-30 11:00:45 · 746 阅读 · 0 评论 -
poj EXTENDED LIGHTS OUT
开关问题是典型的高斯消元问题 不过这道题我一直错了好久,后来发现在对系数矩阵a进行赋值时, 要每次都重新赋值, 不然a作为一个全局变量, 上一次计算的结果造成对下一次结果的影响,下面附上代码 #include #include #include using namespace std; int a[35][35]; void gauss() { int i, j, k; for(k=原创 2013-09-01 14:14:53 · 738 阅读 · 0 评论 -
poj 1681 Painter's Problem
第三道高斯消元, 还是调试了好久, 有一些细节需要控制好, 不然虽然过了样例, 但还是错的, 特别在建立关系矩阵时不要弄错 #include #include #include using namespace std; int a[250][250]; char str[20]; int gauss(int m) { int i, j, k; int col = 1; for(k=1原创 2013-09-01 19:40:34 · 706 阅读 · 0 评论