It took a long time to get to a problem in this group I couldn't brute force, at least after focusing that force, but this one did it. I came up with a strategy which is similar to the one called "chasing the lights" in that it solves one light at a time, but it works in one pass with an endgame cleanup. It does require more data than a person can easily track, but quite easy for a computer. And I came up with it myself in about a day that I was also working. To solve Cody problems, I have done research on the internet, and even once bought a textbook (that didn't help) , but not this time.
I had to submit this three times. My full test came back under 48 seconds consistently. And the failed submissions aren't even on the solution board! ??
A very inspirational problem!!
When I saw this one, I started looking at the "holes" as much as the points retained in the cloud. I re-worked lattice 2, and worked all from 4 to 8 before posting any.
I certainly plan to review at least Tomoaki Takagi's and Rahul's solutions for lessons before going to other problems.
Essentially the same answer as Tomoaki Takagi. I squeezed a lot of Cody points out, and we handled the h=1 case differently. But otherwise the same solution, three applications of omoaki Takagi's lattice1() solution.
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: United States.
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.