#P7441. [2017年杭电多校]Hints of sd0061
[2017年杭电多校]Hints of sd0061
Hints of sd0061
Problem Description
sd0061 , the legend of Beihang University ACM-ICPC Team, retired last year leaving a group of noobs. Noobs have no idea how to deal with coming contests. sd0061 has left a set of hints for them. There are noobs in the team, the -th of which has a rating . sd0061 prepares one hint for each contest. The hint for the -th contest is a number , which means that the noob with the -th lowest rating is ordained by sd0061 for the -th contest. The coach asks constroy to make a list of contestants. constroy looks into these hints and finds out: is satisfied if and . Now, you are in charge of making the list for constroy .
Input
There are multiple test cases (about ). For each test case: The first line contains five integers . The second line contains integers, the -th of which is the number of the -th hint. The noobs' ratings are obtained by calling following function times, the -th result of which is . unsigned x = A, y = B, z = C; unsigned rng61() { unsigned t; x ^= x << 16; x ^= x >> 5; x ^= x << 1; t = x; x = y; y = z; z = t ^ x ^ y; return z; }
Output
For each test case, output " Case #: " in one line (without quotes), where indicates the case number starting from and denotes the rating of noob for the -th contest of corresponding case.
Sample Input
3 3 1 1 1
0 1 2
2 2 2 2 2
1 1
Sample Output
Case #1: 1 1 202755
Case #2: 405510 405510
Source
2017 Multi-University Training Contest - Team 1