QQ and Sangfor pen questions.

Source: Internet
Author: User

Sangfor
2. Write a 10-storey, total control of two elevatorsAlgorithmProgramAnd dynamic demonstration. The specific requirements are as follows: each layer has a pair of buttons (up and down), the bottom layer only has the up button, and the top layer only has the down button. According to the buttons pressed on each floor, the elevator should be dynamically scheduled to ensure that the average waiting time of users on each floor is as short as possible, and that the elevator should be stopped on as few floors as possible, to make the user reach the specified floor as soon as possible, consider the elevator upgrade speed and other factors. Provide a simulation program for this control algorithm. The user enters/presses the elevator buttons on each layer in real time and enters the pre-arrival floor after the elevator arrives for dynamic demonstration. Provides algorithm description documents and simple instructions.

 

Qq server background
In the last round of 4th rounds, I encountered a dizzy problem.

As follows:
An Elliptical horse racing track, 1500 long and known X and Y coordinates of the two sides of the runway (note: the two sides of the runway are placed in a coordinate system. the two sides are composed of multiple subdivided points. The coordinates of these points are known. that is, you can view the runway as a line composed of multiple segments connected by points. that is, to describe the runway by means of points)
The coordinates of all vertices are now known. the number of horse runways is also variable. You can think it is enough. now there are 10 horses running at the same horizontal line, so that they can run at the end of the runway, the program needs to intelligently control the horse Movement, that is to say, the computer is required to design a route for each horse from the start point to the end point. in addition, do not overlap the running positions. It is best not to touch them. At the same time, there is a change in the road to prepare to surpass the opponent. You do not need the wind direction, physical strength, and other horse problems, that is to say, we need to simulate the horse racing in reality.

In this way, you need to design a perfect idea to implement the Path Algorithm for the 10 horses to reach the destination,
Algorithm requirements: must not be too slow, cannot be too stupid, must be closer to the reality of horse racing.

N people on csdn, give comments. Don't hide them.

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.