-
Notifications
You must be signed in to change notification settings - Fork 0
/
number.hpp
143 lines (132 loc) · 27.1 KB
/
number.hpp
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#ifndef NUMBER_HPP
#define NUMBER_HPP
#include <algorithm>
class number
{
private:
static constexpr uint8_t value[48] = {1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209};
static constexpr uint8_t key[210] =
{
0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2,
3, 3, 3, 3,
4, 4,
5, 5, 5, 5,
6, 6, 6, 6, 6, 6,
7, 7,
8, 8, 8, 8, 8, 8,
9, 9, 9, 9,
10, 10,
11, 11, 11, 11,
12, 12, 12, 12, 12, 12,
13, 13, 13, 13, 13, 13,
14, 14,
15, 15, 15, 15, 15, 15,
16, 16, 16, 16,
17, 17,
18, 18, 18, 18, 18, 18,
19, 19, 19, 19,
20, 20, 20, 20, 20, 20,
21, 21, 21, 21, 21, 21, 21, 21,
22, 22, 22, 22,
23, 23,
24, 24, 24, 24,
25, 25,
26, 26, 26, 26,
27, 27, 27, 27, 27, 27, 27, 27,
28, 28, 28, 28, 28, 28,
29, 29, 29, 29,
30, 30, 30, 30, 30, 30,
31, 31,
32, 32, 32, 32,
33, 33, 33, 33, 33, 33,
34, 34,
35, 35, 35, 35, 35, 35,
36, 36, 36, 36, 36, 36,
37, 37, 37, 37,
38, 38,
39, 39, 39, 39,
40, 40, 40, 40, 40, 40,
41, 41,
42, 42, 42, 42, 42, 42,
43, 43, 43, 43,
44, 44,
45, 45, 45, 45,
46, 46,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47
};
static constexpr uint8_t data[48][48][3] = // times, adjust, target
{
{{10, 0, 1},{ 2, 0, 5},{ 4, 0,12},{ 6, 0,23},{10, 0,43},{ 2, 0,11},{ 2, 0,13},{ 6, 0,42},{ 4, 0,33},{ 2, 0,19},{ 4, 0,39},{ 6, 1,17},{ 2, 0,24},{ 8, 2,12},{ 6, 1,35},{ 4, 1,13},{ 2, 0,32},{ 4, 1,19},{ 4, 1,24},{ 2, 0,37},{ 2, 0,40},{ 4, 1,40},{ 6, 2,42},{ 6, 2,46},{ 6, 3, 2},{ 4, 2, 3},{ 2, 1, 3},{ 6, 3,21},{ 4, 2,20},{ 2, 1,12},{ 6, 3,44},{ 4, 2,30},{ 6, 4, 4},{ 2, 1,20},{ 6, 4,15},{ 4, 2,47},{ 4, 3, 5},{ 6, 4,36},{ 4, 3,11},{ 2, 1,30},{ 2, 1,33},{ 6, 5, 8},{ 6, 5,17},{ 2, 1,39},{ 4, 3,32},{ 8, 7,24},{ 4, 3,37},{ 2, 1,47}},
{{ 2, 0, 2},{10, 0,27},{ 2, 0, 8},{ 4, 0,18},{ 8, 0,36},{ 4, 0,23},{ 4, 0,28},{ 2, 0,17},{ 6, 1, 5},{ 6, 1,11},{ 2, 0,21},{ 4, 0,46},{ 4, 1, 2},{ 4, 1, 8},{ 6, 1,37},{ 8, 2,28},{ 6, 2, 3},{ 2, 0,35},{ 2, 0,38},{ 6, 2,20},{ 4, 1,35},{ 6, 2,39},{ 6, 2,45},{ 6, 2,47},{ 4, 2, 4},{ 2, 1, 4},{ 4, 2,10},{ 2, 1,10},{ 6, 3,32},{ 6, 3,37},{ 4, 2,31},{ 2, 1,18},{ 4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6, 5,30},{ 4, 4, 8},{ 2, 2,28},{ 4, 4,14},{ 6, 6, 5},{ 2, 2,34},{ 2, 2,36},{10,10, 4},{ 6, 6,24},{ 4, 4,35},{ 2, 2,42},{10,10,46}},
};
uint64_t block;
uint8_t rest;
public:
number(uint64_t prime): block(prime / 210), rest(key[prime % 210]) {}
number(uint64_t prime, uint64_t begin)
{
uint64_t multiplier = std::max(prime, begin / prime + (begin % prime != 0));
multiplier += value[key[multiplier % 210]] - multiplier % 210;
block = prime * multiplier / 210;
rest = key[prime * multiplier % 210];
}
uint64_t get_block() const { return block; }
uint8_t get_rest() const { return rest; }
uint64_t get_number() const { return block * 210 + value[rest]; }
void retract(uint64_t blocks) { block -= blocks; }
number &operator += (const number rhs)
{
block += rhs.block * data[rest][rhs.rest][0] + data[rest][rhs.rest][1];
rest = data[rest][rhs.rest][2];
return *this;
}
};
#endif