Language: C++

#include<bits/stdc++.h>
#define int og long
using namespace std;
signed main()
{
  int n,m,c,a[10000][10000],b[10000];
  int y=0,x=0;
  cin>>n>>m;
  cin>>c;
  for(int i=0;i<c;i++)
  {
    cin>>b[i];
  }
  int z=0;
  int d=0;
  for(int i=0;i<n;i++)
  {
    for(int j=0;j<m;j++)
    {
      a[z]--;
      a[i][j]=z+1;
      if(b[z]==0)
      {
        z++;
      }
      if(z==c)
      {
        break;
      }
    }
  }
  for(int i=0;i<n;i++)
  {
    for(int j=0;j<m;j++)
    {
      if(i%2==0)
      {
      cout<<a[i][j]<<" "<<endl;
      }
      else
      {
        cout<<a[i][m-j-1]<<" "<<endl;
      }
    }
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:13: error: 'og' was not declared in this scope; did you mean 'log'?
    2 | #define int og long
      |             ^~
a.cc:6:3: note: in expansion of macro 'int'
    6 |   int n,m,c,a[10000][10000],b[10000];
      |   ^~~
a.cc:2:16: error: expected ';' before 'long'
    2 | #define int og long
      |                ^~~~
a.cc:7:3: note: in expansion of macro 'int'
    7 |   int y=0,x=0;
      |   ^~~
a.cc:8:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |   cin>>n>>m;
      |        ^
      |        yn
a.cc:8:11: error: 'm' was not declared in this scope; did you mean 'tm'?
    8 |   cin>>n>>m;
      |           ^
      |           tm
a.cc:9:8: error: 'c' was not declared in this scope
    9 |   cin>>c;
      |        ^
a.cc:2:16: error: expected ';' before 'long'
    2 | #define int og long
      |                ^~~~
a.cc:10:7: note: in expansion of macro 'int'
   10 |   for(int i=0;i<c;i++)
      |       ^~~
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   for(int i=0;i<c;i++)
      |               ^
a.cc:12:10: error: 'b' was not declared in this scope
   12 |     cin>>b[i];
      |          ^
a.cc:2:16: error: expected ';' before 'long'
    2 | #define int og long
      |                ^~~~
a.cc:14:3: note: in expansion of macro 'int'
   14 |   int z=0;
      |   ^~~
a.cc:2:16: error: expected ';' before 'long'
    2 | #define int og long
      |                ^~~~
a.cc:15:3: note: in expansion of macro 'int'
   15 |   int d=0;
      |   ^~~
a.cc:2:16: error: expected ';' before 'long'
    2 | #define int og long
      |                ^~~~
a.cc:16:7: note: in expansion of macro 'int'
   16 |   for(int i=0;i<n;i++)
      |       ^~~
a.cc:16:15: error: 'i' was not declared in this scope
   16 |   for(int i=0;i<n;i++)
      |               ^
a.cc:2:16: error: expected ';' before 'long'
    2 | #define int og long
      |                ^~~~
a.cc:18:9: note: in expansion of macro 'int'
   18 |     for(int j=0;j<m;j++)
      |         ^~~
a.cc:18:17: error: 'j' was not declared in this scope; did you mean 'jn'?
   18 |     for(int j=0;j<m;j++)
      |                 ^
      |                 jn
a.cc:20:7: error: 'a' was not declared in this scope
   20 |       a[z]--;
      |       ^
a.cc:20:9: error: 'z' was not declared in this scope
   20 |       a[z]--;
      |         ^
a.cc:22:10: error: 'b' was not declared in this scope
   22 |       if(b[z]==0)
      |          ^
a.cc:2:16: error: expected ';' before 'long'
    2 | #define int og long
      |                ^~~~
a.cc:32:7: note: in expansion of macro 'int'
   32 |   for(int i=0;i<n;i++)
      |       ^~~
a.cc:32:15: error: 'i' was not declared in this scope
   32 |   for(int i=0;i<n;i++)
      |               ^
a.cc:2:16: error: expected ';' before 'long'
    2 | #define int og long
      |                ^~~~
a.cc:34:9: note: in expansion of macro 'int'
   34 |     for(int j=0;j<m;j++)
      |         ^~~
a.cc:34:17: error: 'j' was not declared in this scope; did you mean 'jn'?
   34 |     for(int j=0;j<m;j++)
      |                 ^
      |                 jn
a.cc:38:13: error: 'a' was not declared in this scope
   38 |       cout<<a[i][j]<<" "<<endl;
      |             ^
a.cc:42:15: error: 'a' was not declared in this scope
   42 |         cout<<a[i][m-j-1]<<" "<<endl;
      |               ^