Optimize 2-2 some more
This commit is contained in:
parent
b8b7087bc4
commit
b0238d6e5f
|
@ -1,4 +1,4 @@
|
||||||
def f(k):
|
def f(d,e,f):
|
||||||
a,b,c=*map(int,k[0].split('-')),k[1][0]
|
a,b=*map(int,d.split('-'))
|
||||||
return (k[2][a-1]==c)^(k[2][b-1]==c)
|
return (f[a-1]==e[0])^(f[b-1]==e[0])
|
||||||
print(sum(f(x.split()) for x in open("/dev/stdin")))
|
print(sum(f(*x.split()) for x in open("/dev/stdin")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user