m@main=getLine>>=print.f.map read.words>>m f[a,b]=a*b+sum[f[a-1,b-1]|a*b>0]
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page