good enough

This commit is contained in:
2025-11-22 11:52:50 -06:00
parent aa5cb355ee
commit e114b059f0

View File

@@ -121,29 +121,32 @@ int main () {
spdlog::debug("Folder {} is ready", folder.string());
} catch (const fs::filesystem_error& e) {
std::cerr << "Filesystem error: " << e.what() << std::endl;
spdlog::error("FS error {}", e.what());
return 1;
}
int counter = {0};
while(counter<1000){
for (int n={5}; n<100; n++) {
for (int m={5}; m<100; m++) {
while(true){
for (int n={55}; n<100; n++) {
for (int m={55}; m<100; m++) {
for (double wall_prob={0.01}; wall_prob<0.5; wall_prob+=0.01) {
std::vector<std::vector<char>> grid = generate_maze(n,m,wall_prob);
int answer = solution(n, m, grid);
if (answer==-1) continue;
std::ofstream input_file = std::ofstream{fmt::format("{}/{}-{}-{}.in", folder.string(), n,m,wall_prob)};
std::ofstream out_file = std::ofstream{fmt::format("{}/{}-{}-{}.out", folder.string(), n,m,wall_prob)};
std::ofstream input_file = std::ofstream{fmt::format("{}/{}-{}-{}.in", folder.string(), n,m,static_cast<int>(wall_prob*100))};
std::ofstream out_file = std::ofstream{fmt::format("{}/{}-{}-{}.out", folder.string(), n,m, static_cast<int>(wall_prob*100))};
input_file << fmt::format("{} {}\n", n,m);
input_file << format_grid(grid);
out_file << fmt::format("{}",answer);
input_file.flush(); out_file.flush(); input_file.close(); out_file.close();
counter++;
if(counter>50000)goto done_mega_loop;
}
}
}
}
done_mega_loop:
return 0;
}