Language: C++

#include <iostream>
#include <fstream>
#include <cmath>  
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <numeric>
#include <functional>
#include <string> 
#include <vector>
#include <bitset>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>

using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REREP(i,n) for(int i = int(n - 1); i >= 0; i--)
#define FOR(i, m, n) for(int i = int(m);i < int(n);i++)
#define REFOR(i, m, n) for(int i = int(n - 1);i >= int(m);i--)
#define ALL(obj) (obj).begin(),(obj).end()
#define fi first 
#define se second

#define VI vector<int>
#define VVI vector<vector<int>>
#define VVVI vector<vector<vector<int>>>
#define VD vector<double>
#define VVD vector<vector<double>>
#define VVVD vector<vector<vector<double>>>
#define VL vector<ll>
#define VVL vector<vector<ll>>
#define VVVL vector<vector<vector<ll>>>
#define VB vector<bool>
#define VVB vector<vector<bool>>
#define VVVB vector<vector<vector<bool>>>
#define VS vector<string>
#define VVS vector<vector<string>>
#define VVVS vector<vector<vector<string>>>

#define PII pair<int,int>
#define PDD pair<double,double>
#define PLL pair<ll,ll>
#define VPII vector<pair<int,int>>
#define VVPII vector<vector<pair<int,int>>>
#define VVVPII vector<vector<vector<pair<int,int>>>>
#define VPLL vector<pair<ll,ll>>
#define VVPLL vector<vector<pair<ll,ll>>>
#define VVVPLL vector<vector<vector<pair<ll,ll>>>>

const ll MOD = (ll)1e9 + 7;
const ll HINF = (ll)1e18;
const ll LINF = (ll)1e9;
const long double PI = 3.1415926535897932384626433;


void YN(bool flag) {
	cout << ((flag) ? "YES" : "NO") << endl;
}

void Yn(bool flag) {
	cout << ((flag) ? "Yes" : "No") << endl;
}

void yn(bool flag) {
	cout << ((flag) ? "yes" : "no") << endl;
}

int main() {
int H,W;
cin >> H >> W;
VVI a(H,VI(W));
REP(i,H)REP(j,W)cin>>a[i][j];
VI s,t,u,v;

REP(i,H){
int x,y;

if(i%2==0){

REP(j,W){
if(i==H-1&&j==W-1)break;
if(j!=W-1){
y=i;
x=j+1;
}
else{
y=i+1;
x=j;
}
if(a[i][j]%2==1){
a[i][j]--;
a[y][x]++;
s.push_back(i);
t.push_back(j);
u.push_back(y);
v.push_back(x);
}
  
}

}

else{

for(j=W-1;j>=0;j--){
if(i==H-1&&j==0)break;
if(j!=0){
y=i;
x=j-1;
}
else{
y=i+1;
x=j;
}
if(a[i][j]%2==1){
a[i][j]--;
a[y][x]++;
s.push_back(i);
t.push_back(j);
u.push_back(y);
v.push_back(x);
}
  
 }

}
  
  
 }
cout<<s.size()<<endl;
REP(i,s.size()) cout <<s[i]<<“ ”<<t[i]<<“ ”<<u[i]<<“ ”<<v[i]<<endl;











	return 0;
}



Compiler output:
a.cc:138:30: error: extended character “ is not valid in an identifier
  138 | REP(i,s.size()) cout <<s[i]<<“ ”<<t[i]<<“ ”<<u[i]<<“ ”<<v[i]<<endl;
      |                              ^
a.cc:138:32: error: extended character ” is not valid in an identifier
  138 | REP(i,s.size()) cout <<s[i]<<“ ”<<t[i]<<“ ”<<u[i]<<“ ”<<v[i]<<endl;
      |                                ^
a.cc:138:41: error: extended character “ is not valid in an identifier
  138 | REP(i,s.size()) cout <<s[i]<<“ ”<<t[i]<<“ ”<<u[i]<<“ ”<<v[i]<<endl;
      |                                         ^
a.cc:138:43: error: extended character ” is not valid in an identifier
  138 | REP(i,s.size()) cout <<s[i]<<“ ”<<t[i]<<“ ”<<u[i]<<“ ”<<v[i]<<endl;
      |                                           ^
a.cc:138:52: error: extended character “ is not valid in an identifier
  138 | REP(i,s.size()) cout <<s[i]<<“ ”<<t[i]<<“ ”<<u[i]<<“ ”<<v[i]<<endl;
      |                                                    ^
a.cc:138:54: error: extended character ” is not valid in an identifier
  138 | REP(i,s.size()) cout <<s[i]<<“ ”<<t[i]<<“ ”<<u[i]<<“ ”<<v[i]<<endl;
      |                                                      ^
a.cc: In function 'int main()':
a.cc:112:5: error: 'j' was not declared in this scope
  112 | for(j=W-1;j>=0;j--){
      |     ^
a.cc:138:30: error: '\U0000201c' was not declared in this scope
  138 | REP(i,s.size()) cout <<s[i]<<“ ”<<t[i]<<“ ”<<u[i]<<“ ”<<v[i]<<endl;
      |                              ^