Skip to content

Instantly share code, notes, and snippets.

@Lapin0t
Created January 31, 2017 16:15
Show Gist options
  • Save Lapin0t/dca994675a693425218686ca4cf53578 to your computer and use it in GitHub Desktop.
Save Lapin0t/dca994675a693425218686ca4cf53578 to your computer and use it in GitHub Desktop.
Some fun with ACM exercice 12205
(lambda r,e:e(r(r('(λip·(λr,e,it,t,f·e((λc·e(print(sum(1 for(a,b)in c if x+y>a '
'and a+b>x))for(x,y)in(f()for _ in r(m))))([t(f())[2:]for _ in r(n)])for(n,m)in'
' it.takewhile(λx·x!=(0,0),(t(f())for _ in it.repeat(None)))))(range,λi·ip("fun'
'ctools").reduce(λx,y·None,i),ip("itertools"),tuple,λ·map(int,input().split()))'
')(__import__)','λ','lambda '),'·',':')))(str.replace,eval)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment