Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned int Findpairs(const std::vector<std::vector<unsigned int>>& A) {
- unsigned int count = 0;
- for (unsigned int i = 0; i < (A.size()-1); i++) {
- for (unsigned int j = 0; j < (A[i].size()-1); j++){
- if(A[i][j]==1 && A[i+1][j]==1 && A[i+1][j+1]==1){
- count++;
- }
- }
- }
- return (count);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement