26
htamas
6 20 33
3410/ 3945
​ ​
Last seen 8 years ago
Member for 10 years, 7 months, 5 days
Difficulty Normal
Best reviews / Newest reviews
Indented-veky 5 1
[Did you mean](http://tr.im/4tbdr): checkio = (lambda N, H, R=range, L=len: (lambda *_:0)(*map(*reversed((R(L(H)), lambda i: (lambda *_:0)(*map(*reversed((R(L(H[i])), lambda j: (lambda _:_())(lambda I = i + L(N), J = j + L(N[0]): 0 i More
Path finding-Amachua 2 1
tmp = sqrt((s%4-(g+v)%4)**2+(s//4-(g+v)//4)**2) Tip: you don't need sqrt here. If you are only comparing distances, you can take advantage of the fact that sqrt(a) < sqrt(b) if and only if a < b. It doesn't matter much in this task, but generally it can be quite useful to work with More
Brute force-nickie 1 1
You're right, it's enough to call eval(e) if x and y are already in locals(). More
Alpha beta pruning-nickie 1
Nice solution. By the way, the value you attach to the game states is always -1000 or 1000 so you could have used 0 and 1 (or equivalently, False and True) as well. More