#include using namespace std; int main(){ int N,M,sum=0; cin>>N>>M; char flag[N][M]; for(int i=0;i>flag[i][j]; } } for(int i=0;i