Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 4 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 16 Sep 2017 My Price 10.00

NCC judge

The NCC judge is down and you are given the responsibility of ranking the contestants.
You are given the list of submissions of the entire contest. For each submission, a single line consisting of Player Name, Question No. and Submission Points will be given.
You have to rank the players and print the name of player who is at rank r.

Questions numbers are numbered 1-indexed.
Some rules that are to be followed are given below:
Rules:

  • 1: The score of a player is the sum of the maximum score he scored in each of the questions he attempted.
  • 2: For each player, consider only the maximum points obtained by player for a particular question.
  • 3: In case of ties, player with lesser number of submissions will have a better rank, i.e., he will rank higher.
  • 4: Ranks is 1-indexed.


Note:
There is no test case where the no. of submissions and the score of more
than 1 players are both equal.
Input:
The first line will consist the total number of players(p), total submissions(s), total
questions(q) and max achievable score for questions(m)(Maximum achievable score for all the questions is same) all separated by space.
Next line will contain r. It will be followed by s lines consisting the player name,question number and points (separated by space) scored in that question. Player name will be a string of not more than 25 characters.
Output:
Output the name of player at rth rank on a single line.
Constraints:
1 p
1 s 7
1 q
1 m
1 r
Sample test case:
#1
Input:
4 18 7 7
1
a 1 7
b 3 6
b 2 5
c 4 7
d 1 6
d 2 5
d 1 6
a 1 6
b 7 3
c 7 3
c 6 7
a 3 6
a 2 5
b 2 5
c 4 6
d 6 7
d 6 6
b 3 5

Output:
a
Explaination:
Here the scores are:
a-->18
b-->14
c-->17
d-->18
We have to find first ranked player,but here there is tie between 'a' and 'd' , but total no. of
submissions are less for 'a', so 'a' is ranked first and 'b' second.

Answers

(5)
Status NEW Posted 16 Sep 2017 02:09 PM My Price 10.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)