The Parking Lot
All submissions for this problem are available.
The Parking slot Problem
In uvce, due to lack of parking slots a new method has been devised to allot parking places to people and hence each one of the
students who want a parking slot must follow this procedure every week.In all there are 5 parking slots which are rated according to the numbers
allotted, for instance a guy with the parking slot no:1 gets better facilities than the guy with parking slot no:2 and so on.
Hence every one wants a parking slot which is least-numbered bcoz of the better facilities available there.
Now every week these 5 parking slots are up for grabs via the following procedure:
Participants of this contest pick six unique numbers between 1 and 45, inclusive, for each ticket. Every Saturday, six regular numbers and one
bonus number are drawn to determine the winners. The bonus number is only used with the second slot.
The winners are determined in the following manner:
Number of Matches on the Ticket Prize
|6 out of 6 regular number:||First Parking slot|
|5 out of 6 regular numbers and the bonus number:||Second Parking slot|
|5 out of 6 regular numbers:||Third Parking slot|
|4 out of 6 regular numbers:||Fourth Parking slot|
|3 out of 6 regular numbers:||Fifth Parking slot|
|2 out of 6, 1 out of 6, 0 out of 6:||No Parking slot|
now a student in uvce who has bought 5 tickets just to be sure wants to know whether he has actually won a slot??
The input will contain six lines of data. The first line will contain the six regular numbers (in any random order) and the
bonus number, each separated by a space. The next five lines will each contain the six numbers (in
any random order) on each of the five tickets that the student has played. Each number is separated by a
The output will contain five lines of data, corresponding to each ticket line of the input . Each line will contain the
slot that the student has won, as described in the chart above.
35 22 42 28 20 11 25 35 21 14 33 1 34 35 42 16 22 38 8 29 12 42 25 28 2 25 28 22 11 20 35 1 40 41 43 44 45Output:
No Parking slot Fifth Parking slot No Parking slot Second Parking slot No Parking slot
|Time Limit:||0.18 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, JAR, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions