diff options
| author | Tyler Wardhaugh <tyler.wardhaugh@gmail.com> | 2020-09-08 09:31:16 -0700 |
|---|---|---|
| committer | Tyler Wardhaugh <tyler.wardhaugh@gmail.com> | 2020-09-08 09:31:16 -0700 |
| commit | d6124e1dd1e2f11c081daf991b6000d5a1666917 (patch) | |
| tree | ce33d482cc3fe22e05312ea050b4a3ad221154e3 /challenge-077/ash/cpp | |
| parent | d9bd8a19492ee4633d39ca533c05511b6925aa16 (diff) | |
| download | perlweeklychallenge-club-d6124e1dd1e2f11c081daf991b6000d5a1666917.tar.gz perlweeklychallenge-club-d6124e1dd1e2f11c081daf991b6000d5a1666917.tar.bz2 perlweeklychallenge-club-d6124e1dd1e2f11c081daf991b6000d5a1666917.zip | |
Task 2: improve lonely detection
First, restrict search to elements that are X (or 1 in our case), so
we're not doing unnecessary work. Second, we can sum all the elements in
the submatrix and if they are equal to 1, then the only 1 is the element
we're checking and it is indeed surrounded by all 0s.
Diffstat (limited to 'challenge-077/ash/cpp')
0 files changed, 0 insertions, 0 deletions
