Old things about Queen's issue

Source: Internet
Author: User

What is the first class to see Queen 8 in the computer department? Should it be algorithm? It seems that there is no such course, and the most likely thing is "Data Structure". Our department of mathematics also has "Data Structure", which is a popular version and requires no computer department, after all, our applications are only a small part. I should have understood it at that time, but I don't remember that I wrote down this algorithm completely, and I was totally lost.

However, I should have met similar algorithms. In the course of "mathematical model", modeling for a problem should be the same as the eight queens problem, is traversal, pruning? Back to the first type. There are roughly a bunch of irregular numbers, so we should try to bring together a certain number as close as possible. This is the case after modeling. The original question should be a very practical problem. At that time, everyone was very impressed. I and a child in the children's class both completed the selection of computer programs, but my algorithm ran out of the results in about 1 minute, and he could not run out of the results, because it has been running for more than an hour. At that time, the most important thing I did for this algorithm was to jump out ahead of schedule and skip some cases. At that time, I still didn't know what backtracing is. Anyway, I thought it was too long, save some time. At that time, the problem seemed to be more complicated than the eight queens problem, but it was basically the same.

At that time, I would not write a program. I asked lausong to write the Pascal code for me. Now I still remember a bunch of variables in the program, and long judgments and loops, there are also the ugly naming habits of Song, aaaaaa, bbbbbb, and I'll let it go. Now I am a programmer, and song became a famous young mathematician. This proves the famous saying: do not work hard, grow up to engage in it.

Old things about Queen's issue

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.