题目链接:http://poj.org/problem?id=1681
题目分析:本题是有的存在自由变元的高斯消元,而且存在无解的情况,还是有一定难度的;
代码如下:
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <math.h>
#include <vector>
#include <string>
#include <utility>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
const int maxn=15*15+5;
int a[maxn][maxn+1],x[maxn];//
int equ,var;
int free_num,ans=100000000;
void Debug(){ //调试输出,看消元后的矩阵值,提交时,就不用了
int i,j;
for(i=0;i<equ;i++){
for(j=0;j<var+1;j++)
cout<<a[i][j]<<" ";
cout<<endl;