HackerEarth Save Patients problem solution - TheCScience