```#include#include#includeusing namespace std;int main(){ int n, m; int res = 0; cin >> n >> m; vector> v(n, vector(m)); // 切割字符串每一位为int for (int i = 0; i { string t; cin >> t; for (int j = 0; j v[i][j] = t[j]-'0'; } // 逐行 for (int i = 0; i { for (int j = 0; j { // 往后查2个 if (j { if (v[i][j] != 1 || v[i][j + 1] != 1) { res++; } } // 往后查1个 else if (j == m -1 && v[i][j] != 1) { res++; } } } cout return 0;}```