Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;


int H, W;
int a[505][505];
//vector<pair<pair<int, int>, pair<int, int> > > ans;
vector< vector<ll> > ans;

int main(){

  for(int i = 0; i < 505 ; i++){
    for(int j =0 ; j < 505; j++){
      a[i][j] = -1;
    }
  }

  cin >> H >> W;
  for(int i = 0 ; i < H ; i++){
    for(int j = 0 ; j < W ; j++){
      int inp;
      cin >> inp;
      a[i+1][j+1] = inp;
    }
  }

  pair<int, int> now = make_pair(1,1);
  while(1){
    int i = now.first;
    int j = now.second;



    pair<int, int> nex ;
    if(a[i][j+1] != -1){
      nex = make_pair(i,j+1);
    }
    else if(a[i][j-1]!= -1){
      nex = make_pair(i,j-1);
    }
    else if(a[i+1][j] != -1){
      nex = make_pair(i+1,j);
    }
    else break;

    if(a[i][j] % 2){
      //ans.push_back(make_pair(now, nex));
      vector<ll> ret;
      ret.push_back(now.first);
      ret.push_back(now.second);
      ret.push_back(nex.first);
      ret.push_back(nex.second)
      a[nex.first][nex.second] += 1;
    }
    a[i][j] = -1;
    now.first = nex.first;
    now.second = nex.second;
  }

  cout << ans.size() << endl;
  for(int i = 0; i < ans.size(); i++){
    for(int j = 0 ; j < ans[i].size(); j++){
      cout << ans[i][j] << " ";
    }
    cout << endl;
    //cout << ans[i].first.first << " " << ans[i].first.second << " " << ans[i].second.first << " " << ans[i].second.second << endl;

  }


  return 0;
}


Compiler output:
a.cc:10:16: error: 'll' was not declared in this scope
   10 | vector< vector<ll> > ans;
      |                ^~
a.cc:10:18: error: template argument 1 is invalid
   10 | vector< vector<ll> > ans;
      |                  ^
a.cc:10:18: error: template argument 2 is invalid
a.cc:10:20: error: template argument 1 is invalid
   10 | vector< vector<ll> > ans;
      |                    ^
a.cc:10:20: error: template argument 2 is invalid
a.cc: In function 'int main()':
a.cc:50:14: error: 'll' was not declared in this scope
   50 |       vector<ll> ret;
      |              ^~
a.cc:50:16: error: template argument 1 is invalid
   50 |       vector<ll> ret;
      |                ^
a.cc:50:16: error: template argument 2 is invalid
a.cc:51:11: error: request for member 'push_back' in 'ret', which is of non-class type 'int'
   51 |       ret.push_back(now.first);
      |           ^~~~~~~~~
a.cc:52:11: error: request for member 'push_back' in 'ret', which is of non-class type 'int'
   52 |       ret.push_back(now.second);
      |           ^~~~~~~~~
a.cc:53:11: error: request for member 'push_back' in 'ret', which is of non-class type 'int'
   53 |       ret.push_back(nex.first);
      |           ^~~~~~~~~
a.cc:54:11: error: request for member 'push_back' in 'ret', which is of non-class type 'int'
   54 |       ret.push_back(nex.second)
      |           ^~~~~~~~~
a.cc:62:15: error: request for member 'size' in 'ans', which is of non-class type 'int'
   62 |   cout << ans.size() << endl;
      |               ^~~~
a.cc:63:26: error: request for member 'size' in 'ans', which is of non-class type 'int'
   63 |   for(int i = 0; i < ans.size(); i++){
      |                          ^~~~
a.cc:64:28: error: invalid types 'int[int]' for array subscript
   64 |     for(int j = 0 ; j < ans[i].size(); j++){
      |                            ^
a.cc:65:18: error: invalid types 'int[int]' for array subscript
   65 |       cout << ans[i][j] << " ";
      |                  ^