Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define sc(x) scanf("%d",&x);
int h, w;
vector<vector<int> > G;
vector<P> ans;
int main(){
    sc(h) sc(w)
    G.resize(h);
    for (int i = 0; i < h; i++) G[i].resize(w);
    for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) sc(G[i][j])
    for (int i = 1; i <= h; i++) for (int j = 1; j <= w; j++) if (G[i-1][j-1]%2){
        if (j != w) ans.push_back(P(i, j)), ans.push_back(P(i, j+1)), G[i-1][j]++;
        else if (i != h) ans.push_back(P(i, j)), ans.push_back(P(i+1, j)), G[i][j-1]++;
    }
    cout << ans.size() / 2 << endl;
    for (int i = 0; i < ans.size(); i++){
        if (i % 2 == 0) cout << ans[i].first << " " << ans[i].second << " ";
        else cout << ans[i].first << " " << ans[i].second << endl;
    }
    return 0;
}#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define sc(x) scanf("%d",&x);
int h, w;
vector<vector<int> > G;
vector<P> ans;
int main(){
    sc(h) sc(w)
    G.resize(h);
    for (int i = 0; i < h; i++) G[i].resize(w);
    for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) sc(G[i][j])
    for (int i = 1; i <= h; i++) for (int j = 1; j <= w; j++) if (G[i-1][j-1]%2){
        if (j != w) ans.push_back(P(i, j)), ans.push_back(P(i, j+1)), G[i-1][j]++;
        else if (i != h) ans.push_back(P(i, j)), ans.push_back(P(i+1, j)), G[i][j-1]++;
    }
    cout << ans.size() / 2 << endl;
    for (int i = 0; i < ans.size(); i++){
        if (i % 2 == 0) cout << ans[i].first << " " << ans[i].second << " ";
        else cout << ans[i].first << " " << ans[i].second << endl;
    }
    return 0;
}#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define sc(x) scanf("%d",&x);
int h, w;
vector<vector<int> > G;
vector<P> ans;
int main(){
    sc(h) sc(w)
    G.resize(h);
    for (int i = 0; i < h; i++) G[i].resize(w);
    for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) sc(G[i][j])
    for (int i = 1; i <= h; i++) for (int j = 1; j <= w; j++) if (G[i-1][j-1]%2){
        if (j != w) ans.push_back(P(i, j)), ans.push_back(P(i, j+1)), G[i-1][j]++;
        else if (i != h) ans.push_back(P(i, j)), ans.push_back(P(i+1, j)), G[i][j-1]++;
    }
    cout << ans.size() / 2 << endl;
    for (int i = 0; i < ans.size(); i++){
        if (i % 2 == 0) cout << ans[i].first << " " << ans[i].second << " ";
        else cout << ans[i].first << " " << ans[i].second << endl;
    }
    return 0;
}

Compiler output:
a.cc:25:2: error: stray '#' in program
   25 | }#include<bits/stdc++.h>
      |  ^
a.cc:49:2: error: stray '#' in program
   49 | }#include<bits/stdc++.h>
      |  ^
a.cc:25:3: error: 'include' does not name a type
   25 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:31:5: error: redefinition of 'int h'
   31 | int h, w;
      |     ^
a.cc:7:5: note: 'int h' previously declared here
    7 | int h, w;
      |     ^
a.cc:31:8: error: redefinition of 'int w'
   31 | int h, w;
      |        ^
a.cc:7:8: note: 'int w' previously declared here
    7 | int h, w;
      |        ^
a.cc:32:22: error: redefinition of 'std::vector<std::vector<int> > G'
   32 | vector<vector<int> > G;
      |                      ^
a.cc:8:22: note: 'std::vector<std::vector<int> > G' previously declared here
    8 | vector<vector<int> > G;
      |                      ^
a.cc:33:11: error: redefinition of 'std::vector<std::pair<int, int> > ans'
   33 | vector<P> ans;
      |           ^~~
a.cc:9:11: note: 'std::vector<std::pair<int, int> > ans' previously declared here
    9 | vector<P> ans;
      |           ^~~
a.cc:34:5: error: redefinition of 'int main()'
   34 | int main(){
      |     ^~~~
a.cc:10:5: note: 'int main()' previously defined here
   10 | int main(){
      |     ^~~~
a.cc:49:3: error: 'include' does not name a type
   49 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:55:5: error: redefinition of 'int h'
   55 | int h, w;
      |     ^
a.cc:7:5: note: 'int h' previously declared here
    7 | int h, w;
      |     ^
a.cc:55:8: error: redefinition of 'int w'
   55 | int h, w;
      |        ^
a.cc:7:8: note: 'int w' previously declared here
    7 | int h, w;
      |        ^
a.cc:56:22: error: redefinition of 'std::vector<std::vector<int> > G'
   56 | vector<vector<int> > G;
      |                      ^
a.cc:8:22: note: 'std::vector<std::vector<int> > G' previously declared here
    8 | vector<vector<int> > G;
      |                      ^
a.cc:57:11: error: redefinition of 'std::vector<std::pair<int, int> > ans'
   57 | vector<P> ans;
      |           ^~~
a.cc:9:11: note: 'std::vector<std::pair<int, int> > ans' previously declared here
    9 | vector<P> ans;
      |           ^~~
a.cc:58:5: error: redefinition of 'int main()'
   58 | int main(){
      |     ^~~~
a.cc:10:5: note: 'int main()' previously defined here
   10 | int main(){
      |     ^~~~