Sort g@me - doubt

Can’t share the question link since I cant find it on hackerblocks .

Initially, I tried to modify bubble sort by creating two arrays, 1 for names 1 for salary. It gave the correct results but time limit exceeded for one test case.
https://ide.codingblocks.com/s/44590

Then I tried to modify inbuilt sort function. It is showing runtime error for all test cases after submission but giving correct output when I’m giving custom input. I can not find any error.
https://ide.codingblocks.com/s/44588

here is the question link https://hack.codingblocks.com/contests/c/452/90

https://ide.codingblocks.com/s/44594

Here is a much simplified version of your code.