Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Array Packing Challenge

Name: Anonymous 2012-06-17 8:14

You are given n arrays A1..An of nk elements each, of which each element in An is either 0 or n. Your goal is to find an arrangement of the arrays such that no two nonzero elements of the arrays may share the same position, and the total length of the arrangement is minimised. For example, given the input file containing the lines

1010101
20002
303

One possible optimal arrangement is

121012303

Your program must read an input file of the form specified above from standard input and print out the optimal arrangement to standard output.

You have until 2012-07-01 00:00:00 4chan time.

Name: Anonymous 2012-06-18 17:59

>>22

Assume the size of the strings and the number of strings is arbitrary, but here, I'll give another dataset.

100010000010001000101001000001010101
200000020000202000222000002000022002
300303030333303030000300003000000000
000040000004040400044400000404000000
500050500055500000505000000505050500
600000000600000000060000000060000006
707077700000700000000000000000070000

now wat.

still doing a brute-force algo, got distracted by making a sandwich

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List