Oh okay that is true! Thanks
I really expected much better from sereja. I am disappointed with this one.
Your link says âAccess Denied.â This link is the real link to your solution. Also, I might be wrong, but I do not think you are accounting for the case where you need to subtract 1 because the row and column have the number in question at its intersection.
@mogers In the second snippet given above, shouldnât it be columns[a[j][i]]
instead of columns[a[i][j]]
?
No, j processes columns and i the rows.
Can not see editorialist solutionâŚ
int num = a[pi][pj];
if (pos[num].size() > 0){
int bestx = 0, besty = 0;
BX.clear(); BY.clear();
for (int p = 0; p < pos[num].size(); p++){
int x = pos[num][p].first;
int y = pos[num][p].second;
please explain this section of authorâs solution.