-
Notifications
You must be signed in to change notification settings - Fork 0
/
Problems.h
61 lines (50 loc) · 1.41 KB
/
Problems.h
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
#include "ProblemLambda.h"
#include <string>
#include <map>
#include <functional>
std::map<int, ProblemLambda> Problems1_25();
std::map<int, ProblemLambda> Problems26_50();
std::map<int, ProblemLambda> Problems51_75();
extern std::map<int, ProblemLambda> allProblems;
static std::map<int, ProblemLambda> Problems()
{
std::map<int, ProblemLambda> problems = Problems1_25();
std::map<int, ProblemLambda> nextProblems = Problems26_50();
problems.insert(nextProblems.begin(), nextProblems.end());
//nextProblems = Problems51_75();
//problems.insert(nextProblems.begin(), nextProblems.end());
return problems;
}
static std::map<int, ProblemLambda> GetProblems()
{
allProblems = Problems();
void P1(); P1();
void P29(); P29();
void P30(); P30();
void P31(); P31();
void P32(); P32();
void P34(); P34();
void P35(); P35();
void P36(); P36();
void P37(); P37();
void P54(); P54();
//void P67(); P67();
return allProblems;
}
static void AddProblem(ProblemLambda p)
{
allProblems.insert(make_pair(p.Number(), p));
}
#define ProblemStart(number, description) \
{number, ProblemLambda(number, description, \
[]() -> std::string { \
int64_t answer = 0;
#define ProblemEnd \
return to_string(answer); \
}) \
},
#define ProblemEndLast \
return to_string(answer); \
}) \
}