give array restaurant restaurantsi idi ratingi veganFriendlyi pricei distancei you filter restaurant filtersthe veganfriendly filter true meaning include restaurant veganFriendlyi set true false meaning include restaurant in addition filter maxprice maxdistance maximum value price distance restaurant consider respectivelyReturn array restaurant id filtering order rating highest low for restaurant rating order i d high low for simplicity veganFriendlyi veganfriendly value 1 true 0 false example 1input restaurant 14140102805053813044100103511151 veganfriendly 1 maxprice 50 maxdistance 10output 315 Explanation the restaurant arerestaurant 1 id1 rating4 veganfriendly1 price40 distance10restaurant 2 id2 rating8 veganfriendly0 price50 distance5Restaurant 3 id3 rating8 veganfriendly1 price30 distance4restaurant 4 id4 rating10 veganfriendly0 price10 distance3Restaurant 5 id5 rating1 veganfriendly1 price15 distance1 after filter restaurant veganfriendly 1 maxprice 50 maxdistance 10 restaurant 3 restaurant 1 restaurant 5 order rating highest low Example 2input restaurant 14140102805053813044100103511151 veganfriendly 0 maxprice 50 maxdistance 10output 43215explanation the restaurant example 1 case filter veganfriendly 0 restaurant consideredexample 3input restaurant 14140102805053813044100103511151 veganfriendly 0 maxprice 30 maxdistance 3output 45 Constraints1 restaurantslength 104restaurantsilength 51 idi ratingi pricei distancei 1051 maxprice maxdistance 105veganfriendlyi veganfriendly 0 1all idi distinct