diff --git a/generator.c b/generator.c index 51381fc..5d63ece 100644 --- a/generator.c +++ b/generator.c @@ -290,20 +290,22 @@ int main(int argc, char *argv[]) int permutation[graph.V]; while (quit == 0) { - for (int i = 0; i < 1000000; i++) { + for (int i = 0; i < 10000000; i++) { int solution[MAX_ITEMS]; genSolution(permutation, graph.V, solution); - /* printf("["); + if (solution[0] == -1) { + printf("]\n"); + break; + } int j; - for (j = 0; j < (MAX_ITEMS - 2); j++) { + for (j = 0; j < (MAX_ITEMS - 1); j++) { if (solution[j+1] != -1) printf("%d, ", solution[j]); else break; } printf("%d]\n", solution[j]); - */ } break; }