Stergios Upload Compile Checker / Explore-Gitea-Actions (push) Successful in 3s
27 lines
862 B
C
27 lines
862 B
C
#ifndef SOLVE_H
|
|
#define SOLVE_H
|
|
|
|
#include "utils.h"
|
|
#include "node.h"
|
|
|
|
/**
|
|
* @brief Tries to push child nodes based on the current node's move
|
|
* @param curr The current node
|
|
*/
|
|
void try_push_children(Node* curr);
|
|
|
|
/**
|
|
* @brief Runs a solver to find the minimum moves to reach a triplet with zero
|
|
* @param sum Pointer to store the sum of moves for the found solution
|
|
* @param gcd The GCD of the initial triplet
|
|
* @param a0 The initial value of a
|
|
* @param b0 The initial value of b
|
|
* @param c0 The initial value of c
|
|
* @param print_mode The mode for printing the results (1 for full, 2 for minimal)
|
|
* @param output The file pointer for output (can be NULL)
|
|
* @return 1 if a solution is found, 0 otherwise
|
|
*/
|
|
bool solve(int128_t* sum, int128_t gcd,
|
|
int128_t a0, int128_t b0, int128_t c0, int print_mode, FILE* output);
|
|
|
|
#endif /* SOLVE_H */ |