Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>
#include <cstdio>
using namespace std;

#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
/* ここからが本編 */
/* */
/* 入力開始！ */
/* 入力終了！ */

void syori(int a[21][21],int i,int j,int r,int *n)
{
   if(a[i][j]) {
      *n -=a[i][j];
      a[i][j]=0;
   }
}
int main()
{
   int i,j,k,l;
   int o;
   int cnt=1;
   int x;
   int y;
   char c;
   int r;
   static int a[30][30];
   static int judge[100000];
   int n,m;
   for(o=0;;o++) {
      scanf("%d",&n);
      if(n==0)
         break;
      for(i=0;i<n;i++) {
         scanf("%d %d",&x,&y);
         a[x][y]++;
      }
      scanf("%d",&m);
      i=10;j=10;
      for(k=0;k<m;k++) {
         scanf(" %c %d",&c,&r);
         printf("%c %d\n",c,r);
         if(c == 'N') {
            for(l=0;l<r;l++) {
               j++;
               syori(a,i,j,r,&n);
            }
         }
         else if(c == 'E') {
            for(l=0;l<r;l++) {
               i++;
               syori(a,i,j,r,&n);
            }
         }
         else if(c == 'S') {
            for(l=0;l<r;l++) {
               i--;
               syori(a,i,j,r,&n);
            }
         }
         else if(c == 'W') {
            for(l=0;l<r;l++) {
               j--;
               syori(a,i,j,r,&n);
            }
         }
      }
      if(n==0)
         judge[o]=1;
   }
   for(i=0;i<o;i++) {
      if(judge[i])
         printf("Yes\n");
      else
         printf("No\n");
   }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:22: error: cannot convert 'int (*)[30]' to 'int (*)[21]'
   58 |                syori(a,i,j,r,&n);
      |                      ^
      |                      |
      |                      int (*)[30]
a.cc:23:16: note:   initializing argument 1 of 'void syori(int (*)[21], int, int, int, int*)'
   23 | void syori(int a[21][21],int i,int j,int r,int *n)
      |            ~~~~^~~~~~~~~
a.cc:64:22: error: cannot convert 'int (*)[30]' to 'int (*)[21]'
   64 |                syori(a,i,j,r,&n);
      |                      ^
      |                      |
      |                      int (*)[30]
a.cc:23:16: note:   initializing argument 1 of 'void syori(int (*)[21], int, int, int, int*)'
   23 | void syori(int a[21][21],int i,int j,int r,int *n)
      |            ~~~~^~~~~~~~~
a.cc:70:22: error: cannot convert 'int (*)[30]' to 'int (*)[21]'
   70 |                syori(a,i,j,r,&n);
      |                      ^
      |                      |
      |                      int (*)[30]
a.cc:23:16: note:   initializing argument 1 of 'void syori(int (*)[21], int, int, int, int*)'
   23 | void syori(int a[21][21],int i,int j,int r,int *n)
      |            ~~~~^~~~~~~~~
a.cc:76:22: error: cannot convert 'int (*)[30]' to 'int (*)[21]'
   76 |                syori(a,i,j,r,&n);
      |                      ^
      |                      |
      |                      int (*)[30]
a.cc:23:16: note:   initializing argument 1 of 'void syori(int (*)[21], int, int, int, int*)'
   23 | void syori(int a[21][21],int i,int j,int r,int *n)
      |            ~~~~^~~~~~~~~