summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2018-08-02 19:31:35 +0200
committerTom Smeding <tom.smeding@gmail.com>2018-08-02 19:31:35 +0200
commit9fe062538f302cccc8473b8152922637a2999088 (patch)
tree1ed55b3af708b87194f8c9bcbb087c0238d14bfc
parent13b7db622ca860015f94ff70d779443a86e31f80 (diff)
Read from stdin
-rw-r--r--solve.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/solve.cpp b/solve.cpp
index 98bc7b2..946b67f 100644
--- a/solve.cpp
+++ b/solve.cpp
@@ -4,6 +4,7 @@
#include <vector>
#include <string>
#include <bitset>
+#include <algorithm>
#include <cassert>
@@ -244,13 +245,10 @@ ostream& operator<<(ostream &os,const Sudoku<N,BW,BH> &S){
int main(){
- const int N=15,BW=5,BH=3;
- const string fname="eureka.txt";
- // const int N=9,BW=3,BH=3;
- // const string fname="easy2.txt";
+ // const int N=15,BW=5,BH=3;
+ const int N=9,BW=3,BH=3;
- ifstream is(fname);
- Sudoku<N,BW,BH> S(readfile(is));
+ Sudoku<N,BW,BH> S(readfile(cin));
Sudoku<N,BW,BH> origS(S);
auto solutions=S.solve();