Skip to content

Commit

Permalink
Update Linear_Basis.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Predator-SD authored Nov 25, 2017
1 parent f5d662d commit a594fda
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Linear_Basis.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include<bits/stdc++.h>
#include<cstdio>
#include<algorithm>
#define ull unsigned long long
using namespace std;

const int l=100;
const int MAXL=100;

template<int MAXL>
struct Linear_Basis{
ull a[MAXL+3];

Expand All @@ -29,4 +29,15 @@ struct Linear_Basis{
}
}
}

inline void mergefrom(const Linear_Basis &rhs){
for(int i=0;i<MAXL;++i) ins(rhs.a[i]);
}
};

inline Linear_Basis merge(const Linear_Basis &a,const Linear_Basis &b){
Linear_Basis c=a;
for(int i=0;i<MAXL;++i) c.ins(b.a[i]);

return c;
}

0 comments on commit a594fda

Please sign in to comment.