+ int pcnt = solver_solve(solv, &job);
+ if (pcnt && solq.count)
+ {
+ int i, taken = 0;
+ for (i = 0; i < solq.count; i += 2)
+ {
+ if (solq.elements[i] > 0 && solq.elements[i] <= pcnt)
+ if (solq.elements[i + 1] > 0 && solq.elements[i + 1] <= solver_solution_count(solv, solq.elements[i]))
+ {
+ printf("problem %d: taking solution %d\n", solq.elements[i], solq.elements[i + 1]);
+ solver_take_solution(solv, solq.elements[i], solq.elements[i + 1], &job);
+ taken = 1;
+ }
+ }
+ if (taken)
+ pcnt = solver_solve(solv, &job);
+ }
+ if (pcnt)