Minor Changes. Plus found a solution for this mathematically online.
Stergios Upload Compile Checker / Explore-Gitea-Actions (push) Failing after 19s

This commit is contained in:
metallaxis committed 2026-07-09 02:49:29 +03:00
1 parent 984415eb38
commit 8fe6a6aa17
9 files changed
+77 -140

No files matched your search

+6 -8
View File
@@ -52,8 +52,7 @@ void try_push_children(Node* curr) {
}
}
static bool bfs(int128_t* sum, int128_t gcd,
int128_t a0, int128_t b0, int128_t c0, int print_mode, FILE* output) {
static bool bfs(int128_t* sum, int128_t gcd, int128_t a0, int128_t b0, int128_t c0, int print_mode, FILE* output) {
node_pool_reset();
queue_clear();
clear_hash_table();
@@ -82,10 +81,10 @@ static bool bfs(int128_t* sum, int128_t gcd,
if (!found) {
fprintf(output, "No solution found for (");
fprint_int128(output, a0); fprintf(output, ", ");
fprint_int128(output, b0); fprintf(output, ", ");
fprint_int128(output, c0);
fprintf(output, ".\n");
fprint_int128(output, a0 * gcd); fprintf(output, ", ");
fprint_int128(output, b0 * gcd); fprintf(output, ", ");
fprint_int128(output, c0 * gcd);
fprintf(output, ").\n");
return false;
}
@@ -157,8 +156,7 @@ static bool bfs(int128_t* sum, int128_t gcd,
return true;
}
bool solve(int128_t* sum, int128_t gcd,
int128_t a0, int128_t b0, int128_t c0, int print_mode, FILE* output) {
bool solve(int128_t* sum, int128_t gcd, int128_t a0, int128_t b0, int128_t c0, int print_mode, FILE* output) {
/* Execute to BFS */
return bfs(sum, gcd, a0, b0, c0, print_mode, output);
}