-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
46 lines (38 loc) · 1.54 KB
/
main.cpp
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <iostream>
#include <vector>
#include <queue>
#include <chrono>
using namespace std;
#include "sudoku_game.h"
int main()
{
cout << "Sudoku to solve \n";
Game s = Game();
int hard[9][9] = { { 0, 4, 0, 0, 0, 5, 8, 7, 0 },
{ 0, 0, 0, 0, 0, 0, 1, 0, 0 },
{ 0, 9, 0, 0, 0, 0, 0, 0, 2 },
{ 0, 0, 0, 0, 7, 0, 4, 0, 0 },
{ 0, 5, 1, 3, 0, 0, 0, 0, 7 },
{ 0, 0, 3, 0, 0, 6, 0, 0, 0 },
{ 0, 0, 5, 0, 0, 2, 0, 9, 0 },
{ 0, 0, 0, 5, 0, 8, 6, 0, 0 },
{ 0, 0, 0, 0, 6, 4, 0, 0, 0 } };
int easy[9][9] = { {3, 0, 6, 5, 0, 8, 4, 0, 0},
{5, 2, 0, 0, 0, 0, 0, 0, 0},
{0, 8, 7, 0, 0, 0, 0, 3, 1},
{0, 0, 3, 0, 1, 0, 0, 8, 0},
{9, 0, 0, 8, 6, 3, 0, 0, 5},
{0, 5, 0, 0, 9, 0, 6, 0, 0},
{1, 3, 0, 0, 0, 0, 2, 5, 0},
{0, 0, 0, 0, 0, 0, 0, 7, 4},
{0, 0, 5, 2, 0, 6, 3, 0, 0} };
s = easy;
cout << s;
chrono::steady_clock::time_point b = chrono::steady_clock::now();
s.second_solver();
chrono::steady_clock::time_point e = chrono::steady_clock::now();
cout << "Solved \n";
cout << s;
cout << "Congratulations you solved it in : " << chrono::duration_cast<chrono::microseconds>(e - b).count() << " [us] \n \n";
return 0;
}