SEATL - Editorial

Oh okay that is true! Thanks :smiley:

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… :frowning:

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.