+2
.clang-format
+2
.clang-format
+4
-4
src/07/solution.cxx
+4
-4
src/07/solution.cxx
···
15
16
for (size_t i = 1; i < data.size(); ++i) {
17
auto& previous = data[i - 1];
18
-
auto& current = data[i];
19
20
for (size_t ch = 0; ch < current.size(); ++ch) {
21
char previous_ch = previous[ch];
22
-
char current_ch = current[ch];
23
if (previous_ch != 'S' && previous_ch != '|') {
24
continue;
25
}
···
48
49
for (size_t i = 1; i < data.size(); ++i) {
50
auto& previous = data[i - 1];
51
-
auto& current = data[i];
52
53
for (size_t ch = 0; ch < current.size(); ++ch) {
54
if (previous[ch] == '|' && current[ch] == '^') {
···
87
result = count_possible_paths(data, new_pos, cache);
88
89
} else if (data[position.y][position.x] == '^') {
90
-
Position left = Position{.x = position.x - 1, .y = position.y};
91
Position right = Position{.x = position.x + 1, .y = position.y};
92
93
// a weird workaround to satisfy some static checks. maps must
···
15
16
for (size_t i = 1; i < data.size(); ++i) {
17
auto& previous = data[i - 1];
18
+
auto& current = data[i];
19
20
for (size_t ch = 0; ch < current.size(); ++ch) {
21
char previous_ch = previous[ch];
22
+
char current_ch = current[ch];
23
if (previous_ch != 'S' && previous_ch != '|') {
24
continue;
25
}
···
48
49
for (size_t i = 1; i < data.size(); ++i) {
50
auto& previous = data[i - 1];
51
+
auto& current = data[i];
52
53
for (size_t ch = 0; ch < current.size(); ++ch) {
54
if (previous[ch] == '|' && current[ch] == '^') {
···
87
result = count_possible_paths(data, new_pos, cache);
88
89
} else if (data[position.y][position.x] == '^') {
90
+
Position left = Position{.x = position.x - 1, .y = position.y};
91
Position right = Position{.x = position.x + 1, .y = position.y};
92
93
// a weird workaround to satisfy some static checks. maps must
+5
-4
src/common/getinputpath.cxx
+5
-4
src/common/getinputpath.cxx
+5
-5
src/common/istest.cxx
+5
-5
src/common/istest.cxx