hiho week 56 register

Ended

Participants:489

Verdict:Accepted
Score:100 / 100
Submitted:2015-07-31 17:08:41

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<iostream>
using namespace std;
void Swap(double**,double*,int,int,int);
int ToShang(double**,double*,int,int,double*);
int main()
{
    int N,M;
    cin>>N>>M;
    double **a=new double*[M+1];
    double *c=new double[M+1];
    double *jie=new double[N+1];
    for(int i=0;i<M;i++)
    {
        a[i]=new double[N];
        for(int j=0;j<N;j++)
        {
            cin>>a[i][j];
        }
        cin>>c[i];
    }
    //
    //-------------------------------------------
    int flag=ToShang(a,c,M,N,jie);
    if(flag==-1)
    {
        cout<<"Many solutions"<<endl;
    }
    else if(flag==-2)
    {
        cout<<"No solutions"<<endl;
    }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX