letinitbufmaxn=letsubblocksubn=letblock="\xe2\x96\xa1"in(* hard-encoded in utf-8 *)letlen=String.lengthblockinletmaxblock=letrecaddbufbufn=ifn=0thenbuf^"\n"elseaddbuf(buf^block)(n-1)inaddbuf""maxninString.submaxblock(len*(maxn-subn))(len*subn+1)inArray.initmaxnsubblockletrecout=function|[]->print_string"\n"|hd::tl->let_=outtlinprint_stringhdletyoungn=letarr=initbuf(n+1)inletrecloop'nrcacc=ifc<>0&&n*c>=rthen(ifn=1then(ifr<=cthenout(arr.(r)::acc))else(letx=r-cinlet_=ifx>0thenloop'(n-1)x(minc(x-n+2))(arr.(c)::acc)inloop'nr(c-1)acc))inletrecloopnr=ifn<=rthenlet_=loop'nr(r-n+1)[]inloop(n+1)rinloop1nlet_=young(int_of_stringSys.argv.(1))
xsd
#4551()
[
OCaml
]
Rating1/1=1.00
Rating1/1=1.00-0+