Вот мой текущий код:
Код: Выделить всё
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const long INF = numeric_limits::max();
void display_table(const vector &matrix, const string &label, const bool use_letters = false) {
// Determine the maximum cell value for formatting purposes
long max_val = 0;
for (const auto &row : matrix) {
for (long cell : row) {
if (cell < INF && cell > max_val) {
max_val = cell;
}
}
}
// Compute the width for formatting each cell
int max_cell_width = use_letters ? 1 : max(static_cast(to_string(max_val).length()), 1);
if (!label.empty()) {
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79225283/floyd-shortest-path-finder-errors[/url]