Created
February 12, 2018 09:08
-
-
Save deque-blog/0da81e844c0c5ecab8d23e2fbb287aa1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int best_quadrant(Matrix const& m) | |
{ | |
int n = m.size() / 2; | |
int sum = 0; | |
for (int i : range(0, n)) | |
{ | |
for (int j : range(0, n)) | |
{ | |
auto flips = symetric_values(m, n, {i, j}); | |
sum += *std::max_element(flips.begin(), flips.end()); | |
} | |
} | |
return sum; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment