Minimum Spanning Tree by 51b(embed)

n;s[];c(int*a){return 1[&a][2]-a[2];}main(a,b){for(;~scanf(~n%3?"%s":"%d",s+n);)n++;for(qsort(s,n/3,12,c);n--;)printf("%c %s %s %d\n",-(b%3?~b%3?'\x02\xe1\x7f\xff':'\x01\x96~\x00':5379014272)<<14>>n/3&1?84:70,s+n,s+n--,s[n--]);}

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

download

return to the top page