3
vector<vector<int>> findSolution(CustomFunction &customfunction, int z) {5
vector<vector<int>> ans;6
// finding minimum i such that there is no x>=i ans y>=i for which f(x,y)=z7
for (; i < 1001; i++) {8
if (customfunction.f(i, i) > z) {14
// checking bottom right grid15
// k represents x and j represents y16
for (int j = i; j <= 1000 && k > 0; j++) {17
int curr = customfunction.f(k, j);19
ans.push_back({k, j});21
} else if (curr > z) {27
// checking top left grid28
// now k represents y and j represents x29
for (int j = i + 1; j <= 1000 && k > 0; j++) {30
int curr = customfunction.f(j, k);32
ans.push_back({j, k});34
} else if (curr > z) {