Language: C++

#include<iostream>
11;rgb:0000/0000/0000#include<vector>
using namespace std;

vector<vector<int> > ans;

int main(){
    int H, W;
    int a[501][501] = {};
    cin >> H >> W;
    for(int h = 1; h <= H; h++){
        for(int w = 1; w <= W; w++){
            cin >> a[h][w];
        }
    }

    int h = 1, w = 1;
    while(h <= H){
        if(h % 2 == 1){
            while(w < W){
                if(a[h][w] % 2 != 0){
                    vector<int> p{h, w, h, w+1};
                    ans.push_back(p);
                    a[h][w+1]++;
                }
                w++;
            }
            if(a[h][W] % 2 != 0 && h < H){
                a[h+1][W]++;
                vector<int> p {h, w, h+1, w};
                ans.push_back(p);
            }
        }
        if(h % 2 == 0){
            while(w > 1){
                if(a[h][w] % 2 != 0){
                    vector<int> p{h, w, h, w-1};
                    ans.push_back(p);
                    a[h][w-1]++;
                }
                w--;
            }
            if(a[h][1] % 2 != 0 && h < H){
                a[h+1][1]++;
                vector<int> p {h, w, h+1, w};
                ans.push_back(p);
            }
        }
        h++;
    }
    cout << ans.size() << endl;
    for(int i = 0; i < ans.size(); i++){
        cout << ans[i][0] << " " << ans[i][1] << " " << ans[i][2] << " " << ans[i][3] << endl;
    }
}


Compiler output:
a.cc:2:22: error: stray '#' in program
    2 | 11;rgb:0000/0000/0000#include<vector>
      |                      ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 11;rgb:0000/0000/0000#include<vector>
      | ^~
a.cc:2:4: error: 'rgb' does not name a type
    2 | 11;rgb:0000/0000/0000#include<vector>
      |    ^~~
a.cc:5:1: error: 'vector' does not name a type
    5 | vector<vector<int> > ans;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |     cin >> H >> W;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:22:21: error: 'vector' was not declared in this scope
   22 |                     vector<int> p{h, w, h, w+1};
      |                     ^~~~~~
a.cc:22:28: error: expected primary-expression before 'int'
   22 |                     vector<int> p{h, w, h, w+1};
      |                            ^~~
a.cc:23:21: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |                     ans.push_back(p);
      |                     ^~~
      |                     abs
a.cc:23:35: error: 'p' was not declared in this scope
   23 |                     ans.push_back(p);
      |                                   ^
a.cc:30:17: error: 'vector' was not declared in this scope
   30 |                 vector<int> p {h, w, h+1, w};
      |                 ^~~~~~
a.cc:30:24: error: expected primary-expression before 'int'
   30 |                 vector<int> p {h, w, h+1, w};
      |                        ^~~
a.cc:31:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |                 ans.push_back(p);
      |                 ^~~
      |                 abs
a.cc:31:31: error: 'p' was not declared in this scope
   31 |                 ans.push_back(p);
      |                               ^
a.cc:37:21: error: 'vector' was not declared in this scope
   37 |                     vector<int> p{h, w, h, w-1};
      |                     ^~~~~~
a.cc:37:28: error: expected primary-expression before 'int'
   37 |                     vector<int> p{h, w, h, w-1};
      |                            ^~~
a.cc:38:21: error: 'ans' was not declared in this scope; did you mean 'abs'?
   38 |                     ans.push_back(p);
      |                     ^~~
      |                     abs
a.cc:38:35: error: 'p' was not declared in this scope
   38 |                     ans.push_back(p);
      |                                   ^
a.cc:45:17: error: 'vector' was not declared in this scope
   45 |                 vector<int> p {h, w, h+1, w};
      |                 ^~~~~~
a.cc:45:24: error: expected primary-expression before 'int'
   45 |                 vector<int> p {h, w, h+1, w};
      |                        ^~~
a.cc:46:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   46 |                 ans.push_back(p);
      |                 ^~~
      |                 abs
a.cc:46:31: error: 'p' was not declared in this scope
   46 |                 ans.push_back(p);
      |                               ^
a.cc:51:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   51 |     cout << ans.size() << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:51:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   51 |     cout << ans.size() << endl;
      |             ^~~
      |             abs
a.cc:51:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   51 |     cout << ans.size() << endl;
      |                           ^~~~
      |                           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~