Minimum Spanning Tree by murky-satyr

Map do(File standardInput readLines sortByKey(slice(4)asNumber)map(v,b:=(z:=v split map(x,at(x,list(x))))at(1)
writeln(if(b==z=z at(0)union(b),"F ","T "),v)
z map(x,atPut(x,z))))

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page