w:#*data:`I$''0:"03.in"
step:{(acc;len;row):x
:[len=# acc
x
(acc,row i
len
row*~(!w)<1+i:*>((# acc)+1+w-len)# row)]}
solve:{+/{`I$,/$*step/(();x;y)}[x;]'data}
:(one;two):solve'2 12
Great fun today.
w:#*data:`I$''0:"03.in"
step:{(acc;len;row):x
:[len=# acc
x
(acc,row i
len
row*~(!w)<1+i:*>((# acc)+1+w-len)# row)]}
solve:{+/{`I$,/$*step/(();x;y)}[x;]'data}
:(one;two):solve'2 12
Great fun today.