https://www.codechef.com/problems/FGFS[enter link description here][1]
The above is the problem statement. My solution passes both the test cases but after submitting