Created
February 12, 2018 09:10
-
-
Save deque-blog/83f46fe7bf75702b0d595031028f88ae 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; | |
| return accumulate(range(0, n) * range(0, n), 0, [&](int sum, Coord const& coord){ | |
| auto flips = symetric_values(m, n, coord); | |
| return sum + *std::max_element(flips.begin(), flips.end()); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment