Language: C++

#include<iostream>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<limits>
#include<sstream> 
#include<unordered_map>      

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef int itn;
typedef vector<int> vi;
typedef vector<ll> vl;

const int inf = numeric_limits<int>::max() >> 2;
const ll linf = numeric_limits<ll>::max() >> 2;
const ull ulinf = numeric_limits<ull>::max() >> 2;
const double pi = acos(-1);
const int dx[4]={0,-1,1,0};
const int dy[4]={-1,0,0,1};
const int dx8[8]={-1,0,1,-1,1,-1,0,1};
const int dy8[8]={-1,-1,-1,0,0,1,1,1};

#define p_queue(i) priority_queue<i> 
#define rp_queue(i) priority_queue<i, vector<i>, greater<i>> 
#define umap(i,j) unordered_map<i,j>
#define P(p) cout<<(p)<<endl
#define PS(p) cout<<(p)<< " "
#define IN cin >> 
#define rep(i,m,n) for(int i = (m); i < (int)(n); i++)
#define rrep(i,m,n) for(int i = (m-1); i >= (int)(n); i--)
#define inrep(n,a) for(int i = 0; i < (int)(n); i++)cin >> a[i];
#define mod(i) ((i)%(ll)(1e9 + 7))
#define divm(a,b) (mod(a * modpow((ll)b,(ll)(1e9+5))))
#define rsort(a,b,c) sort(a, b, greater<c>())
#define vsort(v) sort(v.begin(), v.end());
#define rvsort(v,c) sort(v.begin(), v.end(), greater<c>());
#define ft first
#define sd second
#define pb push_back
#define it insert
#define sz(x) ((int)(x).size())
#define lb(a,n,k) (lower_bound(a,a+n,k) - a) 
#define vlb(a,k)  (lower_bound(a.begin(),a.end(),k) - a.begin())
#define ub(a,n,k) (upper_bound(a,a+n,k) - a) 
#define vub(a,k)  (upper_bound(a.begin(),a.end(),k) - a.begin())
#define YES cout<<"YES"<< endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl  
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define ret return

ll modpow(ll i,ll j){ ll tmp=1; while(j){ if(j%2)tmp=mod(tmp*i);i=mod(i*i);j/=2;}return tmp;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

vector<string> split(const string &str, char sep){
    vector<string> v;
    stringstream ss(str);
    string buffer;
    while( getline(ss, buffer, sep) ) {
        v.push_back(buffer);
    }
    return v;
}

//ll ncr[100][100];
//ll nCr(int n, int r){if(n==r) ret ncr[n][r] = 1; if(r==0) ret ncr[n][r] = 1; if(r==1) ret ncr[n][r] = n;if(ncr[n][r]) ret ncr[n][r]; ret ncr[n][r] = nCr(n-1,r) + nCr(n-1,r-1);}

//ll npr[100][100]={};
//ll nPr(int n,int r){if(npr[n][r])ret npr[n][r];if(r==0)ret npr[n][r] = 1;if(r==1)ret npr[n][r] = n;ret npr[n][r] = n * nPr(n-1,r-1);}

//ll nHr(int n,int r){ret nCr(n+r-1,r);}

///////////////////////////////////////////////////////////////////////////
int h,w;
int a[505][505] = {};
vector<int> x1,x2,y1,y2;
int main(){
    cin >> h >> w;
    rep(i,0,h)rep(j,0,w)cin >> a[i][j];


    rep(i,0,h){
        rep(j,0,w){
            if(a[i][j]&1){
                int f = 0;
                rep(k,2,4){
                    int nx = j+dx[k],ny = i+dy[k];
                    if(0 <= nx && nx < w && 0 <= ny && ny < h ){
                        
                        if(a[ny][nx]&1){
                            a[ny][nx]++;
                            a[i][j] --;

                            x1.pb(j);
                            y1.pb(i);
                            x2.pb(nx);
                            y2.pb(ny);
                            f = 1;
                            break;
                        }
                    }
                }
                if(f == 0){
                    a[i][j]--;
                    a[i+1][j]++;

                    x1.pb(j);
                    y1.pb(i);
                    x2.pb(i+1);
                    y2.pb(j);
                }
            }
        }
    }

  /*  rep(i,0,h){
        rep(j,0,w)PS(a[i][j]);
        cout << endl;
    }*/

    P(sz(x1));
    rep(i,0,sz(x1))cout << x1[i]+1 << " " << y1[i]+1 << " " << x2[i]+1 << " " << y2[i]+1 <<endl;
    
    
	return  0;
}

Compiler output:
a.cc:87:19: error: 'std::vector<int> y1' redeclared as different kind of entity
   87 | vector<int> x1,x2,y1,y2;
      |                   ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/bits/requires_hosted.h:31,
                 from /usr/include/c++/14/iostream:38,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:47:12: error: request for member 'push_back' in 'y1', which is of non-class type 'double(double) noexcept'
   47 | #define pb push_back
      |            ^~~~~~~~~
a.cc:106:32: note: in expansion of macro 'pb'
  106 |                             y1.pb(i);
      |                                ^~
a.cc:47:12: error: request for member 'push_back' in 'y1', which is of non-class type 'double(double) noexcept'
   47 | #define pb push_back
      |            ^~~~~~~~~
a.cc:119:24: note: in expansion of macro 'pb'
  119 |                     y1.pb(i);
      |                        ^~
a.cc:133:50: warning: pointer to a function used in arithmetic [-Wpointer-arith]
  133 |     rep(i,0,sz(x1))cout << x1[i]+1 << " " << y1[i]+1 << " " << x2[i]+1 << " " << y2[i]+1 <<endl;
      |                                                  ^
a.cc:133:51: warning: pointer to a function used in arithmetic [-Wpointer-arith]
  133 |     rep(i,0,sz(x1))cout << x1[i]+1 << " " << y1[i]+1 << " " << x2[i]+1 << " " << y2[i]+1 <<endl;
      |                                              ~~~~~^~