You are viewing a single comment's thread. Return to all comments →
cpp code:
long long strangeGrid(long long r,long long c) { long long result = 0;
if (r % 2 != 0) { result = (r - 1) * 5 + (c - 1) * 2; } else { result = (r - 2) * 5 + (c - 1) * 2 + 1; } return result;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Strange Grid Again
You are viewing a single comment's thread. Return to all comments →
cpp code:
long long strangeGrid(long long r,long long c) { long long result = 0;
}