![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
高斯消元
morejarphone
这个作者很懒,什么都没留下…
展开
-
POJ 1681 (高斯消元)
板子题,01方程求解,自由元取0不一定是最优的. #include #include #include #include #include using namespace std; #define maxn 333 #define free Free int a[maxn][maxn]; char mp[maxn][maxn]; int free[maxn*maxn]; //标记自由原创 2015-12-08 19:40:35 · 390 阅读 · 0 评论 -
POJ 1753 (高斯消元)
题意是把所有的字母都变成w或者b的最小步数. 跑两次01方程,取最小如果两次都无解就输出无解.板子题~ #include #include #include #include #include using namespace std; #define maxn 333 #define free Free #define n 4 int a[maxn][maxn]; char mp[原创 2015-12-08 20:02:27 · 318 阅读 · 0 评论 -
HDU 3976 (高斯消元 KCL方程)
Electric resistance Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 498 Accepted Submission(s): 259 Problem Description Now give原创 2015-12-09 19:55:29 · 600 阅读 · 0 评论 -
HDU 3364 (高斯消元)
求出每种状态下的自由元个数n,答案就是2^n. #include #include #include #include #include using namespace std; #define maxn 333 #define free Free int a[maxn][maxn]; int aa[maxn][maxn]; int n, m; int free[maxn*maxn]原创 2015-12-08 21:11:07 · 415 阅读 · 0 评论 -
POJ 1830 (高斯消元)
又一个高斯消元的水题,求出自由元的个数n,答案就是2^n. #include #include #include #include #include using namespace std; #define maxn 333 #define free Free int a[maxn][maxn]; int n, m; int free[maxn*maxn]; //标记自由元 int原创 2015-12-08 21:30:43 · 366 阅读 · 0 评论 -
ZOJ 3645 (高斯消元)
BiliBili Time Limit: 2 Seconds Memory Limit: 65536 KB Shirai Kuroko is a Senior One student. Almost everyone in Academy City have super powers, and Kuroko is good at using it. Her ability i原创 2015-12-10 10:45:48 · 350 阅读 · 0 评论 -
HDU 3359 (浮点数高斯消元)
Kind of a Blur Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1975 Accepted Submission(s): 541 Problem Description Image blurri原创 2015-12-09 15:36:23 · 355 阅读 · 0 评论 -
HDU 5544 (独立回路 高斯消元)
Ba Gua Zhen Time Limit: 6000/4000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 330 Accepted Submission(s): 102 Problem Description During the Three原创 2016-04-28 15:09:10 · 1022 阅读 · 0 评论 -
HDU 5755 (高斯消元)
题目链接:点击这里题意:给出一个模3意义下的矩阵,每次选中一个元素就可以使得自身+2,上下左右元素+1。求所有元素变成0的一种解。 O((nm)3)O((nm)^3)怎么会不炸!怎么会不炸!好吧就是不炸,可能在消元的时候0比较多吧=。= 可以为什么不用枚举自由元呢?不是很懂这个数据=。= 直接按照上下左右自身的元素对自己的贡献建立方程组暴力消元,遇到自由元直接取0(?),然后输出。注意是模3意原创 2016-07-27 13:58:59 · 518 阅读 · 0 评论