//how an order is added to a packer void PackManager::get_order(Order toPack) { int index = 0; //finds packer with shortest wait time index = find_shortest(toPack.supreme); packers[index].add(toPack); }
int main (int argc, char **argv) { // If bad input, bail if (argc != 4) return 1; int num_verts = num_nodes (argv[1]); int **weights = malloc (num_verts * sizeof (int *)); int i; // Don't need to zero, as construct_f_f will write over every entry for (i = 0; i < num_verts; i++) weights[i] = malloc (num_verts * sizeof (int)); struct node **graph = init_cache (num_verts); construct_from_file (weights, graph, argv[1]); struct path *shortest = find_shortest (weights, graph, num_verts, atoi(argv[2]), atoi(argv[3])); print_path (shortest); return 0; }
int main() { scanf("%d", &N); for (int i=0; i<N; i++) { scanf("%s", WORD[i]); } for (size_t i=0; i<N; i++) { int result[1000][1000] = {0, }; // printf("WORD: %s\n", WORD[i]); for (size_t j=0; j<N; j++) { if (i != j) { process(i, j, result[j]); // printf(" OTHER: %s ", WORD[j]); // for (int x=0; x<strlen(WORD[i]); x++) { // printf("%d ", result[j][x]); // } // printf("\n"); } } find_shortest(i, result); } }