Language: C++

#include <bits/stdc++.h>
#define up(i,a,b) for(int i=a;i<=b;i++)
#define down(i,a,b) for(int i=a;i>=b;i--)
#define rep(i,a,b) for(int i=a;i<b;i++)
#define repd(i,a,b) for(int i=a-1;i>=b;i--)
#define CL(x) (x<<1)
#define CR(x) (x<<1)+1
#define pb push_back
#define bit1(x) __builtin_popcount(x)
#define self (*this)

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,int> pli;
typedef pair<ll,pii> plii;
#define x first
#define y second

template<typename T> inline void _read(T &x){
    char ch; x=0; bool neg=false;
    for(ch=getchar();ch<'0'||ch>'9';ch=getchar())
        if(ch=='-') neg=true;
    for(;ch>='0'&&ch<='9';ch=getchar()) x=10*x+ch-'0';
    if(neg) x=-x;
}
#define read(a) _read(a)
#define Read(a,b) _read(a),_read(b)
#define READ(a,b,c) _read(a),_read(b),_read(c)

const int maxn=3e5+7;
const int Nblocks=400;
const int maxS=(1<<5)+7;
const ll mod=9901;
const int inf=1e9+7;
const ll linf=1e16+9;
const double pi=4*atan(1);
const ll Radix=1e9;
const int Length=9;
const int MaxDigit=2e4+1;
const int nDigits=MaxDigit/Length+1;

int n,m,a[501][501],res;
int x1[maxn],x2[maxn],y1[maxn],y2[maxn];

inline void Enter(){
    cin>>m>>n;
    up(i,1,m) up(j,1,n) cin>>a[i][j];
}

inline void Solve(){
    #define Kamisama
    rep(i,1,m) up(j,1,n) if(a[i][j]&1)
        x1[++res]=i,y1[res]=j,x2[res]=i+1,y2[res]=j,a[i][j]--,a[i+1][j]++;
    rep(i,1,n) if(a[m][i]&1) x1[++res]=m,y1[res]=i,x2[res]=m,y2[res]=i+1,a[m][i]--,a[m][i+1]++;
    cout<<res<<'\n';
    up(i,1,res) cout<<x1[i]<<' '<<y1[i]<<' '<<x2[i]<<' '<<y2[i]<<'\n';
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL),cout.tie(NULL);
    #ifndef Kamisama
    freopen("TEST.INP","r",stdin);
    freopen("TEST.OUT","w",stdout);
    #endif // Kamisama

    Enter();
    Solve();

    return 0;
}


Compiler output:
a.cc:46:30: error: 'int y1 [300007]' redeclared as different kind of entity
   46 | int x1[maxn],x2[maxn],y1[maxn],y2[maxn];
      |                              ^
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/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 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 'void Solve()':
a.cc:56:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   56 |         x1[++res]=i,y1[res]=j,x2[res]=i+1,y2[res]=j,a[i][j]--,a[i+1][j]++;
      |                           ^
a.cc:56:28: error: assignment of read-only location '*(y1 + ((sizetype)res))'
   56 |         x1[++res]=i,y1[res]=j,x2[res]=i+1,y2[res]=j,a[i][j]--,a[i+1][j]++;
      |                     ~~~~~~~^~
a.cc:57:48: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   57 |     rep(i,1,n) if(a[m][i]&1) x1[++res]=m,y1[res]=i,x2[res]=m,y2[res]=i+1,a[m][i]--,a[m][i+1]++;
      |                                                ^
a.cc:57:49: error: assignment of read-only location '*(y1 + ((sizetype)res))'
   57 |     rep(i,1,n) if(a[m][i]&1) x1[++res]=m,y1[res]=i,x2[res]=m,y2[res]=i+1,a[m][i]--,a[m][i+1]++;
      |                                          ~~~~~~~^~
a.cc:59:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   59 |     up(i,1,res) cout<<x1[i]<<' '<<y1[i]<<' '<<x2[i]<<' '<<y2[i]<<'\n';
      |                                       ^