Chef In Debt
All submissions for this problem are available.
Chef has borrowed money from 10 people. He wants to rearrange the list of people such that he has borrowed maximum money from the first person , minimum money from the second person etc. Here is the list of people from whom Chef has borrowed money.
Note: that if same amount of money has been borrowed from more than 1 person, names should be printed in the same order in which they appear in the original list.
Note that if same amount of money has been borrowed from more than 1 person, names should be printed in the same order in which they appear in the original list.
The first line consists of 10 space separated integers ni , the ith number corresponding to the money borrowed from the ith person.
Print the required answer.
0 <= ni <= 105
Input: 1 2 3 4 5 6 7 8 9 10 Output: Ketan Dhaval Rohan Shivang Nikhil Bhardwaj Dhruv Rishab Gaurav Maji
|Time Limit:||0.15 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, 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, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions