16
Last seen 9 years ago
Member for 11 years, 5 months, 24 days
Difficulty Normal
If I may:
def mp(t):
could be replaced by
'{:+.3g}'.format(t)
which tells to format t with:
* 'g' to print a "pretty float" (6.000000 -> 6)
* '.3' -> up to 3 significant digits are printed (3.14159 -> 3.14)
* digit is prefixed with '+' if positive
However, '{:+.3g}'.for
More
Nice list.insert(0, ...) !
Nice hidden Dijkstra !
You were having performance considerations with bryukh about his [Ore in the Desert](http://www.checkio.org/mission/implementation/python-3/20462/#comment-outer-4263), but you do a min(Q) which is algorithmically not efficient :P
More
The solution would be nicer if points which **ARE** on the convex hull could be avoided. For instance, if you have [[6,4],[2,6],[5,9],[4,2],[8,6],[4,8]], acceptable results would be:
- [1,5,2,4,0,3]
- [1,2,4,0,3]
- [1,5,2,4,3]
- [1,2,4,3]
I know it is said in description that such points sh
More
What about using lists instead of dictionnaries ?
(if lst = ['','I','II'] then lst[1] is 'I' directly)
More
Think about it again, storing the for each cell is also useless in this particular path-search problem !
More
Hi, I'm doing reviews for CheckiO.
Your idea with footprints is nice! However, your code is hard to read and
understand, particularly because everything happens in move(). The name of
this function does not tell what the function does. Maybe you should call
it "findPath" or something like it ?
The
More
# Max brutal : choose 2 indices in height (i0,i1), choose 2 indices in width (j0,j1),
# which gives a rect
# Count R,W,T in it
# If not any, adds surf=(i1-i0+1)*(j1-j0+1) to an iterable
# Gives max of that iterable
More