Count the Overlap by hallvabo (nozip)

while~0:_=map(int,raw_input().split()[1::2]);a,b,c=[{(_[i]+x,_[i+1]+y)for(x)in range(_[i+2])for(y)in range(_[i+3])}for(i)in 0,4,8];print'ab',len(a&b),'ac',len(a&c),'bc',len(b&c),'abc',len(a&b&c)

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

download

return to the top page