Eight Queens | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Eight Queens

How to write a C++ program in ten lines to solve it?

10th Feb 2018, 4:52 AM
Oscar Jin
Oscar Jin - avatar
5 Answers
0
Hi Oscar, can you add more details about your challenge?
10th Feb 2018, 7:54 AM
Vijay
Vijay - avatar
0
Hi, Vijay. I thought you had known about it. So sorry, here is the reference: https://en.m.wikipedia.org/wiki/Eight_queens_puzzle
11th Feb 2018, 12:27 AM
Oscar Jin
Oscar Jin - avatar
0
hi Oscar, I tried c++ code but not possible in 10 lines.
14th Feb 2018, 3:58 PM
Vijay
Vijay - avatar
0
Hi, Vijay. You can try to use conditional operations. May my suggestions be useful to you. e.g. x=a:b?a>b it can save a lot
15th Feb 2018, 12:08 AM
Oscar Jin
Oscar Jin - avatar