-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
40 lines (36 loc) · 1.53 KB
/
main.cpp
File metadata and controls
40 lines (36 loc) · 1.53 KB
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
#include <map>
#include <chrono>
#include "math/math.hpp"
#ifndef INCLUDE
// generated by the cmake file
#include "generated/all_problems.hpp"
#else
#include INCLUDE
#endif
#define STR(n) #n
#define STRDEEP(n) STR(n)
int main(const int argc, const char *const argv[]) {
#ifdef INCLUDE
auto start = std::chrono::steady_clock::now();
std::cout << STRDEEP(PROBLEM) << ": " << PROBLEM() << std::endl;
auto end = std::chrono::steady_clock::now();
std::cout << "Time: " << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() / 1000.0 << "s" << std::endl;
#else
all_problems();
#endif
// std::cout << "Problem 1: " << problem_1() << std::endl;
// std::cout << "Problem 2: " << problem_2() << std::endl;
// std::cout << "Problem 3: " << problem_3() << std::endl;
// std::cout << "Problem 4: " << problem_4() << std::endl;
// std::cout << "Problem 5: " << problem_5() << std::endl;
// std::cout << "Problem 10: " << problem_10() << std::endl;
// std::cout << "Problem 14: " << problem_14() << std::endl;
// std::cout << "Problem 24: " << problem_24() << std::endl;
// std::cout << "Problem 87: " << prime_power_triples() << std::endl;
// std::cout << "Problem 102: " << problem_102() << std::endl;
// std::cout << "Problem 193: " << problem_193() << std::endl;
// std::cout << "Problem 484: " << problem_484() << std::endl;
// std::cout << "Problem 698: " << problem_698() << std::endl;
// std::cout << "Problem 903" << problem_903() << std::endl;
return 0;
}