Skip to main content
7 events
when toggle format what by license comment
Mar 29, 2017 at 17:28 history edited JS1 CC BY-SA 3.0
Modified to fix clock_t issue pointed out by chux.
Mar 29, 2017 at 17:22 comment added JS1 @chux I just copied that from the original code without looking at it. Thanks for pointing out that deficiency.
Mar 29, 2017 at 12:51 comment added chux Minor: clock_t is a real type which may include double or even long double. The cast (float) may unnecessarily narrow the math. Perhaps (double) (1.0*(clock() - start) / CLOCKS_PER_SEC) or %Lf ... (1.0L*(clock() - start) / CLOCKS_PER_SEC)?
Mar 28, 2017 at 18:15 comment added Marius Macijauskas Thanks! I will write a slightly more generalized version of the original problem, finding all positions where N queens attack/occupy every square, using your algorithm, which is not only faster, but also shorter and simpler! I'll post the code soon.
Mar 28, 2017 at 18:11 vote accept Marius Macijauskas
Mar 28, 2017 at 18:08 history edited JS1 CC BY-SA 3.0
added 75 characters in body
Mar 28, 2017 at 17:21 history answered JS1 CC BY-SA 3.0