Quick Sort

Time limit: 500ms
Memory limit: 256mb

Description:
Given an array of student structures, denoted as stu. 
Please complete the missing part of the following code to sort the stu in descending order according to their scores. You can only use quicksort, other sorting algorithms are not allowed.
1. Quicksort
When you need to initialize a pivot to partition, you can either use the rand() function (stdlib.h, Google for more details) or use the first element of the current interval directly.
-------------------------Copy the following code, complete it and submit-------------------------


/*
I, , am submitting the assignment for
an individual project.
I declare that the assignment here submitted is original except for
source material explicitly acknowledged, the piece of work, or a part
of the piece of work has not been submitted for more than one purpose
(i.e. to satisfy the requirements in two different courses) without
declaration. I also acknowledge that I am aware of University policy
and regulations on honesty in academic work, and of the disciplinary
guidelines and procedures applicable to breaches of such policy and
regulations, as contained in the University website
http://www.cuhk.edu.hk/policy/academichonesty/.
It is also understood that assignments without a properly signed
declaration by the student concerned will not be graded by the
teacher(s).
*/

#include <stdio.h>
#include <stdlib.h>

// structure of Student
struct Student {
    float score;
    char name[10];
};

void print_stu_set(struct Student * stu, int n){
    int i;
    for (i = 0; i < n; i++) {
        printf("Rank: %2d, Score: %.1f, Name: %s\n", i+1, stu[i].score, stu[i].name);
    }
    return;
}

void Quicksort(struct Student * stu, int left, int right) {
    // write your code here
    if(left < right){
        //initialize a pivot value to partition
    }
}

// DO NOT MODIFY THE CODE BELOW
int main() {
    int i, n;
    scanf("%d", &n);
    if (n <= 0) {
        printf("Error input!\n");
        return -1;
    }
    struct Student stu[n];
    for (i = 0; i < n; i++) {
        scanf("%f,%s", &stu[i].score, stu[i].name);
    }
    Quicksort(stu, 0, n-1);
    print_stu_set(stu, n);
    return 0;
}

-------------------------------------------End of Code------------------------------------------

Input:
The first line is a positive integer N;
Then N lines of student information, each line contains score and name, separated by a comma;

Output:
You should output the information of students in descending order according to their scores.

Sample Input 1:
10
83.5,Amy
90,Ben
87,Caroll
82,David
95.5,Emma
91,Frank
82.5,Gloria
93.5,Hamilton
88,Ivana
96,Jack

Sample Output 1:
Rank:  1, Score: 96.0, Name: Jack
Rank:  2, Score: 95.5, Name: Emma
Rank:  3, Score: 93.5, Name: Hamilton
Rank:  4, Score: 91.0, Name: Frank
Rank:  5, Score: 90.0, Name: Ben
Rank:  6, Score: 88.0, Name: Ivana
Rank:  7, Score: 87.0, Name: Caroll
Rank:  8, Score: 83.5, Name: Amy
Rank:  9, Score: 82.5, Name: Gloria
Rank: 10, Score: 82.0, Name: David
Submit