paren matching by nn

for(i=0;l=readline();)for each(c in l+'\n')p=')]}'['([{'.indexOf(c)],it[p&&i++]=p,putstr(c=='?'?it[--i]:c)

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

download

return to the top page