diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2018-08-02 19:31:35 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-08-02 19:31:35 +0200 |
commit | 9fe062538f302cccc8473b8152922637a2999088 (patch) | |
tree | 1ed55b3af708b87194f8c9bcbb087c0238d14bfc | |
parent | 13b7db622ca860015f94ff70d779443a86e31f80 (diff) |
Read from stdin
-rw-r--r-- | solve.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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(); |