summaryrefslogtreecommitdiff
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/lights_out.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/c++/lights_out.cpp b/c++/lights_out.cpp
index 810f403..a5a277c 100644
--- a/c++/lights_out.cpp
+++ b/c++/lights_out.cpp
@@ -5,9 +5,12 @@
constexpr size_t M = 3;
constexpr size_t N = 3;
-constexpr size_t MN = M * N;
-using Mat = std::array<std::array<bool,MN>,MN>;
-using Vec = std::array<bool,MN>;
+
+template<size_t MM, size_t NN>
+using Mat = std::array<std::array<int8_t,MM*NN>,MM*NN>;
+
+template<size_t MM, size_t NN>
+using Vec = std::array<int8_t,MM*NN>;
struct point {
point():x{0},y{0}{}
@@ -91,11 +94,21 @@ bool lu_decompose_gf2(Mat& R, std::array<size_t,MN>& P){
return true;
}
+
+template<uint64_t MM, uint64_t NN>
+int solve_lights_out(const std::array<MM*NN,int8_t>& b){
+
+
+
+ return 0;
+}
+
extern "C"{
+
int fake_main(){
- Mat A;
+ Mat<M,N> A;
- Vec b{
+ Vec<M,N> b{
1,0,1,
1,0,1,
0,0,0