Timeline for Visualize a Nim board like an expert
Current License: CC BY-SA 4.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 22, 2018 at 15:45 | comment | added | lynn |
You may also set c=m=2**len(bin(l)) , since the characters don't matter as long as they are distinct, but you'll get some really gnarly outputs! (EDIT: oh, actually you want to stay in range(256) of course. But I guess there's no reason c=1 wouldn't be allowed, say.)
|
|
Jun 22, 2018 at 15:37 | comment | added | lynn | And then a full program is 181 bytes | |
Jun 22, 2018 at 15:37 | comment | added | lynn | Some golfs for 189 bytes. | |
Jun 19, 2018 at 15:51 | comment | added | Jonah | @TFeld Doorknob is correct, in 1 3 4 5 you must remove the entire 2nd pile. If you can make a pile of 2, you can't choose to split it up. The strategy won't work if you do. Note that there are still multiple correct visualizations, in that you can still select different sets of characters, spacing, etc. | |
Jun 19, 2018 at 14:48 | comment | added | Doorknob | @TFeld I think so, because currently (after removing one stone from the second row) it tries to pair one stone in the second row with the top row and one with the last stone in the bottom row. It should take the entire second row as a group, because it has a power-of-two number of stones. | |
Jun 19, 2018 at 14:10 | comment | added | TFeld | @Neil, Fixed for larger numbers now :) | |
Jun 19, 2018 at 14:10 | history | edited | TFeld | CC BY-SA 4.0 |
added 44 characters in body
|
Jun 19, 2018 at 14:04 | comment | added | TFeld |
@Doorknob, Is that required? The rules say There will be multiple ways to achieve a valid visualization, and all are valid
|
|
Jun 19, 2018 at 13:57 | comment | added | Doorknob | It also fails for [1, 3, 4, 5], where it should remove the entire second pile. | |
Jun 19, 2018 at 9:19 | comment | added | Neil |
Sorry, I managed to fool it again, this time with 14, 21, 35 .
|
|
Jun 19, 2018 at 8:42 | comment | added | TFeld | @Neil Nice catch, should be fixed now | |
Jun 19, 2018 at 8:42 | history | edited | TFeld | CC BY-SA 4.0 |
added 100 characters in body
|
Jun 19, 2018 at 8:17 | comment | added | Neil |
I don't think this works for 4, 9, 10 .
|
|
Jun 19, 2018 at 7:31 | history | answered | TFeld | CC BY-SA 4.0 |