Can someone please help, and check my code its giving few AC, few WA and few TLE

//Code for Problem Wormholes (ZCO12002),//Codechef Practice#include <bits/stdc++.h>using namespace std;int binSrchLow(vector<int> A, int l, int r, int k) {if(r == l) {if(A[l] <= k)return A[l];elsereturn A[l-1];}else if(r > l) {int mid = l + (r-1)/2;if(A[mid] == k)return A[mid];