Minesweeper by Y.OHNO(2hrs)

char*p,m[999];n(i){p[i]+=p[i]>47;}o(i){n(i);n(-i);}main(c){for(c=289;c;m[--c]=48);for(p=m+18;~scanf("%c",&c);p++)c-46&&(*p=c),c-42||o(18)+o(17)+o(16)+o(1);puts(m+18);}

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

download

return to the top page