#include <vector> class Solution { public: int sum(int n) { int sum = 0; while(n) { sum += n%10; n /= 10; } return sum; } bool maxCount(int& threshold, int& rows, int& cols,vector<vector<bool>> &dp,int i,int j,int& max) { if(i < 0 || i >= rows || j < 0 || j >= cols || d...