How to make each user's admission ticket (especially the admission ticket number, the test place) according to the existing user registration information in the library table, how to realize, mainly is the thought, asks the big God to instruct?
Reply to discussion (solution)
The ticket number is not generated online, but is pre-generated and saved
Candidates from the same location should be distributed evenly to each test site. Candidates from the same location are not adjacent
The ticket number is not generated online, but is pre-generated and saved
Candidates from the same location should be distributed evenly to each test site. Candidates from the same location are not adjacent
Yes, well, that makes sense, but how exactly does it correspond?
The basic algorithm is roughly like this:
Number of test sites known, sequential numbering, candidates sorted by source
Traverse candidates and assign test centers. Each assigned one, test center number plus One (cycle count)
For each test center, repeat the above procedure, assign seats
Okay, it's been solved.