-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (28 loc) · 994 Bytes
/
main.cpp
File metadata and controls
34 lines (28 loc) · 994 Bytes
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
#include "solver.hpp"
#include <iostream>
#include <string>
#include <vector>
#include <chrono>
int main() {
try {
auto t1 = std::chrono::high_resolution_clock::now();
Solver s;
if (s.solve()) {
std::chrono::duration<double, std::milli> time_taken = std::chrono::high_resolution_clock::now() - t1;
std::clog << "Solution found in " << time_taken.count() << " ms\n";
// auto solution = s.get_solution();
// for (auto const& row : solution) {
// for (auto const& col : row) {
// std::cout << col << ' ';
// }
// std::cout << '\n';
// }
s.printPretty();
} else {
std::clog << "Solving the provided parsed is not possible\n";
}
} catch(std::exception const& ex) {
std::clog << "Failed parsing because: " << ex.what() << std::endl;
return 1;
}
}