34
DiZ
14 34 43
7059/ 7195
Last seen 2 years ago
Member for 11 years, 6 months, 11 days
Difficulty Normal
Best reviews / Newest reviews
set-gyahun_dash 1
That's a nice solution! Just one niptick, no need to cast output to `list` ;-) More
Exception mishandling-veky 1 1
Such exotic lib with use of recent RecursionError, I bet this solution is Veky's! Nice union-find algorithm, although handling cycles by exceeding max depth recursion limit seems a bit inefficient (and wrong on very big graph - 1000 edges, isn't it? - but I don't hope such big tests at CheckIO :-P) More
Borders-DiZ
Do you know that Python has [complex number](https://en.wikipedia.org/wiki/Complex_numberg) support? They are often you to represent a grid in 2D, so `x + 1j * y` represents a point at coordinates _(x, y)_. There is a trick with the second line: `[1j ** k for k in range(4)] produces [1, 1j, -1, - More
Two bins-veky 1 1
It has been quite a while you posted this solution, and I never saw it until now. No counter, no branch, I like it! :D More
A derelict battery-veky 1 1
`format_roman` seems to have disappeared from Python docs! More
receive, review, rewrite, reveal, relish-veky 2 1
I definitely like the representation you have made, keeping stack and moves in same list; even better with the use of `slice`. However, I can't tell I'm fond of this list/''.join step on tuples. If you wanted to introduce some performance with the use of `deque`, I have the feeling that looping two More
Only the first and the last week matters-suic 2 1
Easier: the most frequent day is always the first day of the year. Second day of the year has the same frequency than the first one when its year is leap. More
no module-Pouf 4 1
Changing the beginning of the year is a nice idea. Maybe extracting a function to compute days would be nicer: def days_diff(date1, date2): def days(date): y, m, d = date correction = m <= 2 y -= correction; m += 12*correction - 3 More
59-Volatility
[Mine](http://www.checkio.org/mission/flatten-list/publications/DiZ/python-27/50/) is shorter, mine is shorter! :-P More
First-RandyWaterhouse
I think your code can be clearer if instead of if ord(cstring[i+3]) in range(48, 58): you use if cstring[i+3].isdigit(): More
67 chars-Sim0000 1 1
I'm surprised, finally we have different solutions but (nearly :-P) same code length! More
Bellman–Ford-ish (short)-StefanPochmann
Nice approach. I feared no one else used Bellman-Ford, you proved me wrong ;-) More
Sudo make me a curry-veky 1
I like curry, but currying... a bit indigestible for me :-P More
Multiple assignment in one line.-fantakeshi 1
Maybe simply using Python chained assignments __eq__ = __ne__ = __gt__ = __lt__ = __ge__ = __le__ = lambda a, b: True More
I don't love Python!-DiZ
What if you execute this code with Python 2? :-O More
texas-referee --> s7even-s7even 1
Why not use strings for _ranks_ and _suits_? String is also iterable. ranks, suits = '023456789TJQKA', '0scdh' You can also write your _hand_ variable like this: hand = {h: 10 ** n for n, h in enumerate(['0', 'HC', 'OP', 'TP', 'TK', 'St', 'Fl', 'FH', 'FK', 'SF'])} Or even nicer: han More
56 chars-Sim0000 1
Haha great! Still prefer lambda oneliners though :-P More
Third-dagger126 1
Better than recalculate heuristic, you can simply use _cost_ and add right speed: new_cost = cost + 2 / speed + (field_map[j][i] == 'B') More
Maths - with proof-Juge_Ti 1
Can you explain a bit deduction part from (1) and (2)? I'm really interested in. More
Second-yoichi 1 1
Better than first one, really more readable! But still a niptick: imagine you have 2 live cells (0,0) and (100, 100). Are you really gonna loop through 10,000 (-2) dead cells for nothing? More
1
2 3