criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <iostream>
using namespace std;
#include <stdio.h>

typedef struct {
  int fst, snd;
} taple;

int main() {
  int i,j,k,n,m,score;
  char c;
  taple gems[20], robot, prog;
  
  while(1) {
    scanf("%d", &n); if(n==0) break;
    for(i=0;i<n;i++)
      scanf("%d %d", &gems[i].fst, &gems[i].snd);

    robot.fst = 10; robot.snd = 10;
    score = 0;
    
    scanf("%d", &m);
    for(i=0;i<m;i++){
      /* cin >> c >> prog.snd; */
      scanf("%*c%c %d", &c, &prog.snd);
      prog.fst = (int)(c);

      for(k=0;k<prog.snd;k++){
	switch(prog.fst) {
	case 'N': robot.snd++; break;
	case 'E': robot.fst++; break;
	case 'S': robot.snd--; break;
	case 'W': robot.fst--; break;
	default : printf("error!\n");
	}
	for(j=0;j<n;j++) if(robot.fst==gems[j].fst && robot.snd==gems[j].snd) score++;
      }
    }
    if(score==n)
      printf("Yes\n");
    else
      printf("No\n");
  }

  return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main() {
	int N, M, x, y, g;
	char D[2];
	while (1) {
		int jewelry[20][20] = { 0 };
		int a[20][20] = { 0 };
		cin >> N; 
		if (N == 0)
			break;
		for (int i = 0; i < N; i++) {
			cin >> x >> y;
			jewelry[x][y] = 1;
		}
		cin >> M;
		int x2 = 10; 
		int y2 = 10;
		for (int i = 0; i < M; i++) {
			cin >> D >> g;
			if (strcmp(D, "N") == 0) {
				y2 = y2 + g;
			}
			else if (strcmp(D, "E") == 0) {
				x2 = x2 + g;
			}
			else if (strcmp(D, "S") == 0) {
				y2 = y2 - g;
			}
			else if (strcmp(D, "W") == 0) {
				x2 = x2 - g;
			}
		}
		a[x2][y2] = jewelry[x2][y2];

		if (a[x2][y2] == 1) {
			cout << "Yes" << endl;
		}
		else {
			cout << "No" << endl;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: 'strcmp' was not declared in this scope
   22 |                         if (strcmp(D, "N") == 0) {
      |                             ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

int main() {
	int N, M, x, y, g;
	char D[2];
	while (1) {
		int jewelry[20][20] = { 0 };
		int a[20][20] = { 0 };
		cin >> N; 
		if (N == 0)
			break;
		for (int i = 0; i < N; i++) {
			cin >> x >> y;
			jewelry[x][y] = 1;
		}
		cin >> M;
		int x2 = 10; 
		int y2 = 10;
		for (int i = 0; i < M; i++) {
			cin >> D >> g;
			if (!strcmp(D, "N")) {
				y2 = y2 + g;
			}
			else if (!strcmp(D, "E")) {
				x2 = x2 + g;
			}
			else if (!strcmp(D, "S")) {
				y2 = y2 - g;
			}
			else if (!strcmp(D, "W")) {
				x2 = x2 - g;
			}
		}
		a[x2][y2] = jewelry[x2][y2];

		if (a[x2][y2] == 1) {
			cout << "Yes" << endl;
		}
		else {
			cout << "No" << endl;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: 'strcmp' was not declared in this scope
   22 |                         if (!strcmp(D, "N")) {
      |                              ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

int main(void) {
	int N, M, x, y, g;
	char D[2];
	while (1) {
		int jewelry[20][20] = { 0 };
		int a[20][20] = { 0 };
		cin >> N; 
		if (N == 0)
			break;
		for (int i = 0; i < N; i++) {
			cin >> x >> y;
			jewelry[x][y] = 1;
		}
		cin >> M;
		int x2 = 10; 
		int y2 = 10;
		for (int i = 0; i < M; i++) {
			cin >> D >> g;
			if (!strcmp(D, "N")) {
				y2 = y2 + g;
			}
			else if (!strcmp(D, "E")) {
				x2 = x2 + g;
			}
			else if (!strcmp(D, "S")) {
				y2 = y2 - g;
			}
			else if (!strcmp(D, "W")) {
				x2 = x2 - g;
			}
		}
		a[x2][y2] = jewelry[x2][y2];

		if (a[x2][y2] == 1) {
			cout << "Yes" << endl;
		}
		else {
			cout << "No" << endl;
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: 'strcmp' was not declared in this scope
   22 |                         if (!strcmp(D, "N")) {
      |                              ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

int main(void) {
	int N, M, x, y, g;
	char D[2];
	while (1) {
		int jewelry[20][20] = { 0 };
		int a[20][20] = { 0 };
		cin >> N; 
		if (N == 0)
			break;
		for (int i = 0; i < N; i++) {
			cin >> x >> y;
			jewelry[x][y] = 1;
		}
		cin >> M;
		int x2 = 10; 
		int y2 = 10;
		for (int i = 0; i < M; i++) {
			cin >> D >> g;
			if (!strcmp(D, "N")) {
				y2 = y2 + g;
			}
			else if (!strcmp(D, "E")) {
				x2 = x2 + g;
			}
			else if (!strcmp(D, "S")) {
				y2 = y2 - g;
			}
			else if (!strcmp(D, "W")) {
				x2 = x2 - g;
			}
		}
		a[x2][y2] = jewelry[x2][y2];

		if (a[x2][y2] == 1) {
			cout << "Yes" << endl;
		}
		else {
			cout << "No" << endl;
		}
	}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: 'strcmp' was not declared in this scope
   22 |                         if (!strcmp(D, "N")) {
      |                              ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

int main(void) {
	int N, M, x, y, g;
	char D[2];
	while (1) {
		int jewelry[20][20] = { 0 };
		int a[20][20] = { 0 };
		cin >> N;
		if (N == 0)
			break;
		for (int i = 0; i < N; i++) {
			cin >> x >> y;
			jewelry[x][y] = 1;
		}
		cin >> M;
		int x2 = 10;
		int y2 = 10;
		for (int i = 0; i < M; i++) {
			cin >> D >> g;
			if (!strcmp(D, "N")) 
				y2 = y2 + g;
			else if (!strcmp(D, "E")) 
				x2 = x2 + g;
			else if (!strcmp(D, "S"))
				y2 = y2 - g;
			else if (!strcmp(D, "W"))
				x2 = x2 - g;
		}
		a[x2][y2] = jewelry[x2][y2];

		if (a[x2][y2] == 1) 
			cout << "Yes" << endl;
		else 
			cout << "No" << endl;
	}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: 'strcmp' was not declared in this scope
   22 |                         if (!strcmp(D, "N"))
      |                              ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <cstdio>
using namespace std;

inline int my_popcount(unsigned x)
{
	x=(x&0x55555555)+(x>>1&0x55555555);
	x=(x&0x33333333)+(x>>2&0x33333333);
	x=(x&0x0f0f0f0f)+(x>>4&0x0f0f0f0f);
	x=(x&0x00ff00ff)+(x>>8&0x00ff00ff);
	return (x&0x0000ffff)+(x>>16&0x0000ffff);
}

int main()
{
	constexpr LOOP=1000000000;
	int sum=0; // ループが削除されてしまわないようにする
	for(int i=0;i<LOOP;i++)
		sum+=__builtin_popcount(i);
		//sum+=my_popcount(i);
	printf("%d\n",sum);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: 'LOOP' does not name a type
   15 |         constexpr LOOP=1000000000;
      |                   ^~~~
a.cc:17:23: error: 'LOOP' was not declared in this scope
   17 |         for(int i=0;i<LOOP;i++)
      |                       ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;
 
#define ll long long
#define vvi vector< vector<int> >
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
 
int main(){

  int n;

  while (cin >> n,n){
    int x[100];
    int y[100];

    int gem[25][25] = 1;

    REP(i,n){
      cin >> x[i] >> y[i];
      gem[x[i]][y[i]] = 0;
    }
    int m;

    char d[100];
    int l[100];

    int nowx=10;
    int nowy=10;

    REP(j,m){
      cin >> d[j] >> l[j];
      if (d[j]==N){
	REP(k,l[k]){
	  gem[nowx+k][nowy]=1
	    }
	nowx +=l[j];
      }else if(d[j]==S){
	REP(k,l[k]){
	  gem[nowx-k][nowy]=1
	    }
	nowx -=l[j];
      }else if(d[j]==W){
	REP(k,l[k]){
	  gem[nowx][nowy-k]=1
	    }
	nowx -=l[j];
      }else if(d[j]==E){
	REP(k,l[k]){
	  gem[nowx][nowy+k]=1
	    }
	nowx +=l[j];
      }
    }
    int tf;

    REP(hoge,25){
      REP(huga,25){
	tf +=gem[25][25]
	  }
    }

    if(tf){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:23: error: array must be initialized with a brace-enclosed initializer
   31 |     int gem[25][25] = 1;
      |                       ^
a.cc:47:17: error: 'N' was not declared in this scope
   47 |       if (d[j]==N){
      |                 ^
a.cc:49:30: error: expected ';' before '}' token
   49 |           gem[nowx+k][nowy]=1
      |                              ^
      |                              ;
   50 |             }
      |             ~                 
a.cc:52:22: error: 'S' was not declared in this scope
   52 |       }else if(d[j]==S){
      |                      ^
a.cc:54:30: error: expected ';' before '}' token
   54 |           gem[nowx-k][nowy]=1
      |                              ^
      |                              ;
   55 |             }
      |             ~                 
a.cc:57:22: error: 'W' was not declared in this scope
   57 |       }else if(d[j]==W){
      |                      ^
a.cc:59:30: error: expected ';' before '}' token
   59 |           gem[nowx][nowy-k]=1
      |                              ^
      |                              ;
   60 |             }
      |             ~                 
a.cc:62:22: error: 'E' was not declared in this scope
   62 |       }else if(d[j]==E){
      |                      ^
a.cc:64:30: error: expected ';' before '}' token
   64 |           gem[nowx][nowy+k]=1
      |                              ^
      |                              ;
   65 |             }
      |             ~                 
a.cc:73:25: error: expected ';' before '}' token
   73 |         tf +=gem[25][25]
      |                         ^
      |                         ;
   74 |           }
      |           ~
Language: C++

//#include<cstdio>
//#include<iostream>
//
//#include<algorithm>
//#include<cstdlib>
//#include<queue>
//#include<stack>
#include<iostream>
#include<vector>
#include<stdlib.h>
#include<iomanip>
using namespace std;

int pos[22][22];
int main(){
    while(true){
        int N;
        cin>>N;
        if(N==0)
            break;
        memset (pos,0,sizeof(pos));
        for(int i=0;i<N;i++){
            int x,y;
            cin>>x>>y;
            pos[20-y][x]=1;
        }
        int M;
        cin>>M;
        int x=10,y=10;
        for(int i=0;i<M;i++){
            char d;
            int l;
            cin>>d>>l;
            switch(d){
                case'N':
                    for(int i=0;i<=l;i++){
                        pos[y-i][x]=0;
                    }
                    y-=l;
                    break;
                case'S':
                    for(int i=0;i<=l;i++){
                        pos[y+i][x]=0;
                    }
                    y+=l;
                    break;
                case'W':
                    for(int i=0;i<=l;i++){
                        pos[y][x-i]=0;
                    }
                    x-=l;
                    break;
                case'E':
                    for(int i=0;i<=l;i++){
                        pos[y][x+i]=0;
                    }
                    x+=l;
                    break;
            }
            //cout<<x<<"    "<<y<<endl;
        }
        int a=1;
        
        for(int i=0;i<=20;i++){
//            cout<<setw(2) << setfill('.')<<20-i<<": ";
           for(int j=0;j<=20;j++){
//                cout<<setw(2) << setfill('.')<<pos[i][j];
                if(pos[i][j]==1)
                    a=0;
            }
//            cout<<endl;
        }
//        cout<<"    ";
//        for(int i=0;i<=20;i++)
//            cout<<setw(2) << setfill('.')<<i;
//        cout<<endl;
        cout<<(a==1?"Yes":"No")<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'memset' was not declared in this scope
   21 |         memset (pos,0,sizeof(pos));
      |         ^~~~~~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include<iomanip>
  +++ |+#include <cstring>
   12 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

int main(){
	int x[100],y[100],t[100],s[100],cx,cy,sum;
	char d[100];
	int n,m;
	while(true){
		cin>>n;
		memset(t,0,sizeof(t));
		if(n==0){
			break;
		}
		
		for(int i=1;i<=n;i++){
			cin>>x[i]>>y[i];
			t[i]=1;
		}
		cx=10;
		cy=10;
		sum=0;
		cin>>m;
		for(int i=1;i<=m;i++){
			cin>>d[i]>>s[i];

			if(d[i]=='N'){
				for(int j=1;j<=s[i];j++){
					cy += 1;
					for(int k=1;k<=m;k++){
						if((x[k]==cx && y[k]==cy) && t[i]==1){
							sum += 1;
							t[i]=0;
						}
					}
				}
			}
			if(d[i]=='E'){
				for(int j=1;j<=s[i];j++){
					cx += 1;
					for(int k=1;k<=m;k++){
						if((x[k]==cx && y[k]==cy) && t[i]==1){
							sum += 1;
							t[i]=0;
						}
					}
				}
			}
			if(d[i]=='S'){
				for(int j=1;j<=s[i];j++){
					cy -= 1;
					for(int k=1;k<=m;k++){
						if((x[k]==cx && y[k]==cy) && t[i]==1){
							sum += 1;
							t[i]=0;
						}
					}
				}
			}
			if(d[i]=='W'){
				for(int j=1;j<=s[i];j++){
					cx -= 1;
					for(int k=1;k<=m;k++){
						if((x[k]==cx && y[k]==cy) && t[i]==1){
							sum += 1;
							t[i]=0;
						}
					}
				}
			}

		}
		if(sum==n){
			cout<<"Yes"<<endl;
		}
		else{
			cout<<"No"<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'memset' was not declared in this scope
   10 |                 memset(t,0,sizeof(t));
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <iostream>

#pragma warning(disable: 4996)

int dx[4] = { 0, 1, 0, -1 };
int dy[4] = { 1, 0, -1, 0 };

char dir[5] = "NESW";

int N, M, D, X, Y, A, i, j, k, C[20], R[20], P[21][21];

char c;

int main()
{
	while (true)
	{
		scanf("%d", &N);

		if (N == 0) { break; }

		memset(P, 0, sizeof(P));

		X = Y = 10; A = 0; P[X][Y] = 1;

		for (i = 0; i < N; i++) { scanf("%d%d", &C[i], &R[i]); }

		scanf("%d", &M);

		for (i = 0; i < M; i++)
		{
			std::cin >> c >> D;

			for (j = 0; j < 4; j++)
			{
				if (c == dir[j])
				{
					for (k = 0; k < D; k++) { X += dx[j]; Y += dy[j]; P[X][Y] = 1; }
				}
			}
		}

		for (i = 0; i < N; i++) { A += P[C[i]][R[i]]; }

		printf("%s\n", A == N ? "Yes" : "No");
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: 'memset' was not declared in this scope
   22 |                 memset(P, 0, sizeof(P));
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

2
10 11
11 12
2
N 2
E 1
2
10 11
11 12
2
N 2
W 1
3
0 15
5 10
5 15
5
W 10
S 10
N 20
E 10
S 10
0

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 2
      | ^
Language: C++

#include <iostream>


using namespace std;

int main(){
	int N,M;
	while(cin >> N,N){
		int map[21][21]={0},num = 0,l;
		int x,y;
		for(int i = 0;i < N;i++,num++) {
			cin >> x >> y;
			map[x][y] = 1;
		}
		x = 10;
		y = 10;
		cin >> M;
		char d;
		for(int i = 0;i < M;i++){
			cin >> d >> l;
			for(;l > 0;l--){
				if(d == 'N') y++;
				if(d == 'E') x++;
				if(d == 'S') y--;
				if(d == 'W') x--;
				num -= map[x][y];
				map[x][y] = 0;
			}
		}
		if(num == 0) cout << "Yes" << endl;
		else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		if(n==0) 
			break;
		int da[22][22]={};
		int x,y;
		for(int i=0;i<n;i++){
			cin>>x>>y; 
			da[y][x]=1;
		}
		int m;
		cin>>m;
		char v;
		int l;
		int nx=10,ny=10;
		for(int i=0;i<m;i++){
			cin>>v;
			cin>>l;
			if(v=='N'){
				for(int j=1;j<=l;j++)
					da[ny+j][nx]=0;
				ny+=l;
			}
			if(v=='E'){
				for(int j=1;j<=l;j++)
					da[ny][nx+j]=0;
				nx+=l;
			}
			if(v=='S'){
				for(int j=1;j<=l;j++)
					da[ny-j][nx]=0;
				ny-=l;
			}
			if(v=='W'){
				for(int j=1;j<=l;j++)
					da[ny][nx-j]=0;
				nx-=l;
			}
		}
		for(int i=0;i<22;i++){
			for(int j=0;j<22;j++){
				if(da[i][j]==1){
					cout<<"No"<<endl;
					j=30; 
					i=30;
					break;
				}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:52:34: error: expected '}' at end of input
   52 |                                 }
      |                                  ^
a.cc:46:46: note: to match this '{'
   46 |                         for(int j=0;j<22;j++){
      |                                              ^
a.cc:52:34: error: expected '}' at end of input
   52 |                                 }
      |                                  ^
a.cc:45:38: note: to match this '{'
   45 |                 for(int i=0;i<22;i++){
      |                                      ^
a.cc:52:34: error: expected '}' at end of input
   52 |                                 }
      |                                  ^
a.cc:7:22: note: to match this '{'
    7 |         while(cin>>n){
      |                      ^
a.cc:52:34: error: expected '}' at end of input
   52 |                                 }
      |                                  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <cstring>

using namespace std;

bool square[21][21];

int main() {
  int N;
  while (true) {
    cin >> N;
    if (N == 0) break;
    memset(square, false, sizeof(square));
    for (int i = 0; i < N; i++) {
      int x, y;
      cin >> x >> y;
      square[x][y] = true;
    }
    int x = 10,  y = 10;
    int count = 0;
    if (square[x][y]) {
      square[x][y] = false;
      count++;
    }
    int M;
    cin >> M;
    for (int i = 0; i < M; i++) {
      string d;
      int amt;
      cin >> d >> amt;
      for (int j = 0; j < amt; j++) {
        if (d == "N") {
          y++;
        } else if (d == "E") {
          x++;
        } else if (d == "S") {
          y--;
        } else {
          x--;
        }
        if (square[x][y]) {
          square[x][y] = false;
          count++;
      }
    }
    if (count == N) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:2: error: expected '}' at end of input
   53 | }
      |  ^
a.cc:8:12: note: to match this '{'
    8 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;
#define MAX 21

int main()
{
    int n, m, x, y, i, j, dis, res;
    int gems[MAX][MAX];
    char dir;
    while (cin >> n, n) {
        for (i = 0; i < MAX; ++i)
            for (j = 0; j < MAX; ++j)
                gems[i][j] = 0;
        for (i = 0; i < n; ++i) {
            cin >> x >> y;
            gems[x][y] = 1;
        }
        x = y = 10;
        res = gems[x][y];
        cin >> m;
        for (i = 0; i < m; ++i) {
            cin >> dir >> dis;
            if (dir == 'N')
                for (j = 0; j < dis; ++j)
                    res += gems[x][++y];
            if (dir == 'E')
                for (j = 0; j < dis; ++j)
                    res += gems[++x][y];
            if (dir == 'S')
                for (j = 0; j < dis; ++j)
                    res += gems[x][--y];
            if (dir == 'W')
                for (j = 0; j < dis; ++j)
                    res += gems[--x][y];
        }
        if (res == n)
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
 

Compiler output:
a.cc: In function 'int main()':
a.cc:40:6: error: expected '}' at end of input
   40 |     }
      |      ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>
#include <map>

using namespace std;
typedef long long LL;
#define REP(i,N) for(int i = 0; i < (int)N; i++)
int dy[4] = {1,0,-1,0};
int dx[4] = {0,1,0,-1};
bool gems[25][25];
int main(){
	int n;
	cin >> n;
	while(n!=0){
		REP(i,25)memset(gems[i],0,sizeof(gems[i]));
		REP(i,n){
			int x,y;
			cin >> x >> y;
			gems[y][x] = true;
		}
		int ret=0;
		int m;
		cin >> m;
		int nowx,nowy;
		nowx = nowy = 10;
		if(gems[10][10]){
			ret++;
			gems[10][10] = false;
		REP(i,m){
			char c;
			int nor;
			cin >> c >> nor;
			int dir;
			switch(c){
				case 'N':
					dir = 0;
					break;
				case 'E':
					dir = 1;
					break;
				case 'S':
					dir = 2;
					break;
				case 'W':
					dir = 3;
					break;
			}

			REP(j,nor){
				nowx += dx[dir];
				nowy += dy[dir];
				if(gems[nowy][nowx]){
					ret++;
					gems[nowy][nowx] = false;
				}
			}
		}
		if(ret == n){
				cout << "YES" << endl;
		}else{
			 cout << "NO"  << endl;
		}
		cin >> n;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:2: error: expected '}' at end of input
   74 | }
      |  ^
a.cc:19:11: note: to match this '{'
   19 | int main(){
      |           ^
Language: C++

Yes
Yes
No
No
No
Yes
Yes
No
No
No
No
No
Yes
Yes
No
No
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
No
No
No
Yes
Yes
Yes
No
No
Yes
No
No
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes
Yes
Yes
No
Yes
No
No
Yes
No
Yes
Yes
No
No
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
No
No
No
Yes
No
No
No
No
No
Yes
Yes
No
No
No
No
No
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
No
No
No
Yes
No
No
Yes
No
Yes
No
Yes
No
Yes
No
No
No
No
No
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
No
No
No
Yes
Yes
No
No
Yes
No
Yes
No
No
Yes
Yes
No
No
No
Yes
No
No
Yes
Yes
No
Yes
No
No
No
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
No
No
No
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Yes
No
No
No
Yes
No
No
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
No
No
Yes
No
No
No
Yes
Yes
Yes
No
No
Yes
No
No
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No

Compiler output:
a.cc:1:1: error: 'Yes' does not name a type
    1 | Yes
      | ^~~
Language: C++

#include <stdio.h>
int main()
{
  char sute,h;
  int scood[21][2],i,j,m,rx,ry,t,cou,k,s;
  while(1){
    scanf("%d",&s);
    if(s==0)break;
    for(i=0;i<s;i++){
      scanf("%d %d",&scood[i][0],&scood[i][1]);
    }
    scanf("%d%c",&m,&sute);
    rx=10;
    ry=10;
    cou=0;
    //    printf("%d",m);
    for(i=0;i<m;i++){
      scanf("%c %d%c",&h,&k,&sute);

      //printf("%c %d\n",h,k);
      for(j=0;j<k;j++){
	if(h=='N')ry++;
	if(h=='E')rx++;
	if(h=='S')ry--;
	if(h=='W')rx--;


	//printf("%d %d \n",rx,ry);///
	for(t=0;t<s;t++){
	  if(scood[t][0]==rx&&scood[t][1]==ry){
	    cou++;
	    scood[t][0]=100;
	    scood[t][1]=100;
	}
      }
    }
    //printf("%d",cou);///
    if(cou==s)printf("Yes\n");
    else if(cou!=s)printf("No\n");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

for(int i=0;i<21;i++){
      for(int j=0;j<21;j++){

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'for'
    1 | for(int i=0;i<21;i++){
      | ^~~
a.cc:1:13: error: 'i' does not name a type
    1 | for(int i=0;i<21;i++){
      |             ^
a.cc:1:18: error: 'i' does not name a type
    1 | for(int i=0;i<21;i++){
      |                  ^
Language: C++

#define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996)
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <functional>
#include <sstream>
#include <cmath>
#include <set>
#include <map>
using namespace std; 

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define all(a) a.begin(),a.end()
#define len(x) ((int)(x).size())
#define tmax(a,b,c) max((a),max((b),(c)))
#define tmin(a,b,c) min((a),min((b),(c)))
#define debug(x) cerr << #x << " is " << x << endl;

typedef pair<int, int> Pii;
typedef vector<int> Vi;
typedef vector<vector<int> > VVi;
typedef long long ll;
const int inf = 2e9;
const ll ll_inf = 1e17;
const int mod = 1e9 + 7;
const long double eps = 1e-10;

int g[21][21];
int dy[4] = {1,0,-1,0};
int dx[4] = {0,1,0,-1};

int main()
{
	while(1) {
		int n, m;
		cin >> n;
		if (!n) break;
		memset(g, 0, sizeof(g));
		rep(i,0,n) {
			int a, b; cin >> a >> b;
			g[a][b]++;
		}

		cin >> m;
		int tx = 10, ty = 10;
		int cnt = 0;
		rep(i,0,m) {
			char a;
			int b; 
			cin >> a >> b;
			int d;
			if (a == 'N') d = 0;
			else if (a == 'E') d = 1;
			else if (a == 'S') d = 2;
			else if (a == 'W') d = 3;
			rep(j,0,b) {
				tx += dx[d];
				ty += dy[d];
				if (g[tx][ty]) {
					cnt++;
					g[tx][ty]--;
				}
			}
		}
		if (cnt == n) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:17: error: 'memset' was not declared in this scope
   43 |                 memset(g, 0, sizeof(g));
      |                 ^~~~~~
a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   12 | #include <map>
  +++ |+#include <cstring>
   13 | using namespace std;
Language: C++

#include <iostream>
#include <queue>
#include <complex>
#include <functional>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
using namespace std;

typedef complex<double> P;
#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b)) < EPS)
#define EQV(a,b) ( EQ( a.real(), b.real() ) && EQ( a.imag(), b.imag() ) )

#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,n) for(int i=a;i<=n;i++)

//---------------------------------------------------------------------
struct Point {
	int x, y;
};
struct Oridir {
	char o;
	int d;
};
int n, m;
bool check[20];

vector<Point> juel(20);
vector<Oridir> mov(30);

int main() {
	while (cin >> n, n) {
		memset(check, false, sizeof(check));
		rep(i, n) cin >> juel[i].x >> juel[i].y;
		cin >> m;
		rep(i, m) cin >> mov[i].o >> mov[i].d;
		//??\???

		int x = 10, y = 10;
		//m????§???????????????????
		rep(i, m) {
			//d????§????
			while (mov[i].d--) {
				switch (mov[i].o) {
					case 'N': y++; break;
					case 'S': y--; break;
					case 'E': x++; break;
					case 'W': x--; break;
					default: break;
				}
				//?§???????????????????????????\?§???????????????§??????
				rep(j, n) {
					if (check[j]) continue;
					if (x == juel[j].x && y == juel[j].y) check[j] = true;
				}
			}
		}
		//??¨?§??????????

		int suc = true;
		rep(j, n) {
			if (!check[j]) {
				suc = false;
				cout << "NO" << endl;
				break;
			}
		}
		if (suc) cout << "YES" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: 'memset' was not declared in this scope
   37 |                 memset(check, false, sizeof(check));
      |                 ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   10 | #include <map>
  +++ |+#include <cstring>
   11 | using namespace std;
Language: C++

#include <iostream>
#define N 21
using namespace std;
??
int main(){
????int n,m,x,y,rx,ry,l,cnt,d[N][N];
????char c;
????while(1){
????????for(int i=0;i<N;i++)
????????????for(int j=0;j<N;j++) d[i][j]=0;
????????cin>>n;
????????if(!n) break;
????????for(int i=0;i<n;i++) cin>>x>>y,d[N-y-1][x]=1;
????????cin>>m;
????????rx=ry=10;
????????cnt=0;
????????while(m--){
????????????cin>>c>>l;
????????????while(l--){
????????if(c=='N') ry--;
????????if(c=='E') rx++;
????????if(c=='S') ry++;
????????if(c=='W') rx--;
????????if(d[ry][rx]) d[ry][rx]=0,cnt++;
????????????}
????????}
????????if(cnt==n) cout<<"Yes"<<endl;
????????else cout<<"No"<<endl;
????}
????return 0;
}

Compiler output:
a.cc:4:1: error: expected unqualified-id before '?' token
    4 | ??
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>
#include <list>

using namespace std;
#define REP(i,b) for (int i=0;i<(b);i++)
#define FORj(j,a,b) for (int j=(a);j<=(b);j++)

int main(void) {

	int map[20][20] = { 0 };
	int rx = 10,ry = 10;
	int n, m, a, b;
	char dir;
	int cnt = 0;

	while (cin >> n,n) {

		REP(i,n) {
			scanf_s("%d %d", &a, &b);
			map[a][b] = 1;
		}

		scanf_s("%d" ,&m);
		REP(i,m) {
			cin >> dir >> a;

			switch (dir) {
			case 'N':
				FORj(j,1,a) {
					if (map[rx][ry + j] == 1)
						cnt++;
				}
				ry += a;
				break;

			case 'E':
				FORj(j, 1, a) {
					if (map[rx + j][ry] == 1)
						cnt++;
				}
				rx += a;
				break;

			case 'S':
				FORj(j, 1, a) {
					if (map[rx][ry - j] == 1)
						cnt++;
				}
				ry -= a;
				break;

			case 'W':
				FORj(j, 1, a) {
					if (map[rx - j][ry] == 1)
						cnt++;
				}
				rx -= a;
				break;
			}
		}

		if (cnt == n)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
		
		cnt = 0;
		rx = ry = 10;
		
		REP(i, 20) {
			REP(j, 20) {
				map[i][j] = 0;
			}
		}
			
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   28 |                         scanf_s("%d %d", &a, &b);
      |                         ^~~~~~~
      |                         scanf
a.cc:32:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   32 |                 scanf_s("%d" ,&m);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>
#include <vector>

using namespace std;

struct Point
{
    int x_, y_;
    Point() : x_(0), y_(0){}
    Point(const int &x, const int &y) : x_(x), y_(y){}
    Point(const Point &pt)
    {
        x_ = pt.x_;
        y_ = pt.y_;

    }
    void setPoint(const int &x, const int &y)
    {
        x_ = x;
        y_ = y;
    }

};

void updateJewelMap(bool jewel_map[21][21], Point &current_position, const char &direction, const int &step)
{
    for(int i = 0; i < step; i++)
    {
        switch(direction)
        {
        case 'N':
            current_position.y_++;
            break;
        case 'S':
            current_position.y_--;
            break;
        case 'E':
            current_position.x_++;
            break;
        case 'W':
            current_position.x_--;
            break;
        }
        jewel_map[current_position.y_][current_position.x_] = false;
    }
}

bool isGetAllJewel(const bool jewel_map[21][21], const int &width, const int &height)
{
    for(int h = 0; h < height; h++)
    {
        for(int w = 0; w < width; w++)
        {
            if(jewel_map[h][w]){ return false; }
        }
    }
    return true;
}

int main()
{
    bool jewel_map[21][21];
    Point initial_position(10, 10);

    int num_jewel = 0;
    int num_order = 0;

    while(true)
    {
        cin >> num_jewel;
        if(num_jewel == 0){ break; }

        //Initialize jewel map
        for(int h = 0; h < 21; h++)
        {
            for(int h = 0; h < 21; h++)
            {
                jewel_map[h][w] = false;
            }
        }

        //Map jewel positions
        int x, y;
        for(int i = 0; i < num_jewel; i++)
        {
            cin >> x >> y;
            jewel_map[y][x] = true;
        }

        //Set & execute orders
        cin >> num_order;
        char direction;
        int step;
        Point current_position(initial_position);
        jewel_map[current_position.y_][current_position.x_] = false;
        for(int i = 0; i < num_order; i++)
        {
            cin >> direction >> step;
            updateJewelMap(jewel_map, current_position, direction, step); //update jewel_map
        }

        if(isGetAllJewel(jewel_map, 21, 21)){ cout << "Yes" << endl; }
        else                                { cout << "No" << endl; }

    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:78:30: error: 'w' was not declared in this scope
   78 |                 jewel_map[h][w] = false;
      |                              ^
Language: C++

#include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<vector>
#include<bits//stdc++.h>
#include<functional>
using namespace std;
int main() {
	int n;
	while(cin>>n&&n!=0){
		for(int i=0;i<=20;i++){
			for(int j=0;j<=20;j++) a[i][j]=false;
		}
		int c,d;
		for(int i=0;i<n;i++){
			cin>>c>>d;
			a[c][d]=true;
		}
		int sum=n,m;
		int x=10,y=10;
		cin>>m;
		char e;
		for(int i=0;i<m;i++){
			cin>>e>>c;
			if(e=='N')x-=d;
			else if(e=='S') x+=d;
			else if(e=='E') y+=d;
			else y-=d;
			if(a[x][y]) {
				sum--;
				a[x][y]=false;
			} 
		}
		if(sum==0) cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:48: error: 'a' was not declared in this scope
   13 |                         for(int j=0;j<=20;j++) a[i][j]=false;
      |                                                ^
a.cc:18:25: error: 'a' was not declared in this scope
   18 |                         a[c][d]=true;
      |                         ^
a.cc:30:28: error: 'a' was not declared in this scope
   30 |                         if(a[x][y]) {
      |                            ^
Language: C++

#include <bits/stdc++.h>
#include <boost/functional/hash.hpp>
#define DEBUG(x) cout<<#x<<": "<<x<<endl;
#define DEBUGM(xs) cout<<#xs<<": ";REP(_i,(int)xs.size())cout<<xs[_i]<<", ";cout<<endl;
#define REP(i, n) for(int i = 0; i < n; ++i)
#define REPR(i, n) for(int i = n; i >= 0; --i)
#define FOR(i, m, n) for(int i = m; i < n; ++i)
#define ALL(xs) begin(xs),end(xs)
#define _1 first
#define _2 second
#define P(k, v) make_pair(k, v)
#define PII pair<int, int>
using namespace std;
template<class T> using V = vector<T>;
template<class K> using uset = unordered_set<K, boost::hash<K>>;
template<class K, class V> using umap = unordered_map<K, V, boost::hash<K>>;
int dx[] = { 0, 1, 0, -1 }, dy[] = { 1, 0, -1, 0 }; // ??? ??? ??? ???

int main() {
    while(true){
        int n; scanf("%d", &n);
        if(n==0)return 0;
        uset<PII> hs;
        REP(i,n){int f,s;scanf("%d %d",&f,&s);hs.emplace(P(f,s));};
        int m; scanf("%d", &m);
        umap<char,int> conv = {{'N',0},{'E',1},{'S',2},{'W',3}};
        V<PII> xys(m);
        REP(i,m){char c;scanf(" %c %d",&c,&xys[i]._2);xys[i]._1=conv[c];}
        int x=10,y=10;
        REP(i,m+1){
            REP(j,xys[i]._2+1){
                DEBUG(hs.erase(P(x,y)));
                x+=dx[xys[i]._1]*j, y+=dy[xys[i]._1]*j;
            }
        }
        if(hs.size()==0)printf("Yes");
        else printf("No");
    }
}

Compiler output:
a.cc:2:10: fatal error: boost/functional/hash.hpp: No such file or directory
    2 | #include <boost/functional/hash.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>

//??°??¢(0??§???????????????1??§??????)
int place[21][21]={};

//??????????????°??¨??????????????°
int N,M;

//???????????????
int mass;
char dir[10];

int main() {
	while (true) {
		//?????????
		for (int i = 0; i < 21; i++) {
			for (int j = 0; j < 21; j++) {
				place[i][j] = 0;
			}
		}
		//????????\???
		std::cin>>N;
		if(N==0)break;
		for (int i = 0; i < N; i++) {
			int x,y;
			std::cin>>x>>y;
			place[y][x]=1;
		}
		//????????????(?????????(10,10))
		int rX=10;
		int rY=10;
		scanf_s("%d",&M);
		for (int i = 0; i < M; i++) {
			std::cin >> dir >> mass;
			//???????????????
			int dirX,dirY;
			switch (dir[0]) {
			case 'N': dirX=0; dirY=1 ; break;
			case 'S': dirX=0; dirY=-1; break;
			case 'E': dirX=1; dirY=0 ; break;
			case 'W': dirX=-1;dirY=0 ; break;
			}
			for (int i = 0; i < mass; i++) {
				rX+=dirX;
				rY+=dirY;
				place[rY][rX]=0;
			}
		}
		//place??¨??????0??????ok
		bool flag=true;
		for (int i = 0; i < 21; i++) {
			for (int j = 0; j < 21; j++) {
				if(place[i][j]!=0)flag=false;
			}
		}
		if (flag)std::cout << "Yes" << std::endl;
		else     std::cout << "No"  << std::endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   32 |                 scanf_s("%d",&M);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>
using namespace std;
int main()
{
  char dir; //direction                                                         
  int x,y,j,k;
  int dist; //distance                                                          
  int xy[21][21];
    while (cin >> j && j){
      memset(xy,0,sizeof(xy));
      for(int i=0;i<j;i++){
        cin >> x >> y;
        xy[x][y]=1;
      }
      cin >> k;
      x=10;
      y=10;
      int m=0;
      for(int i=0;i<k;i++){
        cin >> dir >> dist;
        for(int l=0;l<dist;l++){
          if(dir == 'N')
            y++;
          else if(dir=='S')
            y--;
          else if(dir=='W')
            x--;
          else if(dir=='E')
            x++;
          if(xy[x][y]==1){
            m++;
            xy[x][y]=0;
          }
        }
      }
      if(j==m)
          cout << "Yes" << endl;
        else
          cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'memset' was not declared in this scope
   10 |       memset(xy,0,sizeof(xy));
      |       ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>

using namespace std;

bool map[21][21];

int main() {
    while (1) {
        int n;
        cin >> n;
        if (n == 0) break;

        memset(map, 0, sizeof(map));

        for (int i = 0; i < n; ++i) {
            int x, y;
            cin >> x >> y;
            map[x][y] = true;
        }

        int m;
        cin >> m;
        int x = 10;
        int y = 10;
        int cnt = 0;
        if (map[10][10]) {
            map[10][10] = false;
            cnt++;
        }

        for (int i = 0; i < m; ++i) {
            char dir;
            int dist;
            cin >> dir >> dist;
            int dx = 0;
            int dy = 0;
            switch(dir) {
                case 'N':
                    dy = 1;
                break;
                case 'S':
                    dy = -1;
                break;
                case 'E':
                    dx = 1;
                break;
                case 'W':
                    dx = -1;
                break;
            }

            for (int k = 0; k < dist; ++k) {
                x += dx;
                y += dy;
                if (map[x][y]) {
                    map[x][y] = false;
                    cnt++;
                }
            }
        }

        cout << (cnt == n ? "Yes" : "No") << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'memset' was not declared in this scope
   13 |         memset(map, 0, sizeof(map));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>
#include <vector>
#include <map>
#define F(a, b) for (int j = a; j < b; j++)
using namespace std;
typedef pair<int, int> mypair;
int main(void)
{
	int n, m;
	while (1)
	{
		cin >> n;
		if (n == 0)
			break;
		vector<vector<int> > t(21, vector<int>(21, 0));
		mypair p;
		int c = 0;
		int x, y;
		for (int i = 0; i < n; i++)
		{
			cin >> x >> y;
			t[x][y] = 1;
		}
		//mypair now(10, 10);
		mypair now;
		now.first＝10;
		now.second=10;
		cin >> m;
		char a;
		for (int i = 0; i < m; i++)
		{
			cin >> a >> x;
			if (a == 'N')
			{
				F(0, x)
				{
					now.second++;
					if (t[now.first][now.second] == 1)
					{
						c++;
						t[now.first][now.second] = 0;
					}
				}
				
			}
			else if (a == 'W')
			{
			
				F(0,x)
				{
					now.first--;
					if (t[now.first][now.second] == 1)
					{
						c++;
						t[now.first][now.second] = 0;
					}
				}
				
			}
			else if (a == 'E')
			{
				F(0,x)
				{	
					now.first++;
					if (t[now.first][now.second] == 1)
					{
						c++;
						t[now.first][now.second] == 0;
					}
				}
				
			}
			else
			{
				F(0,x)
				{
					now.second--;
					if (t[now.first][now.second]==1)
					{
						c++;
						t[now.first][now.second] == 0;
					}
				}
				
			}
		}
		if (c == n)
		{
			cout << "Yes" << endl;
		}
		else
		{
			cout << "No" << endl;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:21: error: 'mypair' {aka 'struct std::pair<int, int>'} has no member named 'first\U0000ff1d10'
   26 |                 now.first＝10;
      |                     ^~~~~~~~~
Language: C++


#include <iostream>
#include <vector>
#include <map>
#define F(a, b) for (int j = a; j < b; j++)
using namespace std;
typedef pair<int, int> mypair;
int main(void)
{
	int n, m;
	while (1)
	{
		cin >> n;
		if (n == 0)
			break;
			int t[21][21]＝｛｝
	//vector<vector<int> > t(21, vector<int>(21, 0));
		mypair p;
		int c = 0;
		int x, y;
		for (int i = 0; i < n; i++)
		{
			cin >> x >> y;
			t[x][y] = 1;
		}
		//mypair now(10, 10);
		mypair now;
		now.first=10;
		now.second=10;
		cin >> m;
		char a;
		for (int i = 0; i < m; i++)
		{
			cin >> a >> x;
			if (a == 'N')
			{
				F(0, x)
				{
					now.second++;
					if (t[now.first][now.second] == 1)
					{
						c++;
						t[now.first][now.second] = 0;
					}
				}
				
			}
			else if (a == 'W')
			{
			
				F(0,x)
				{
					now.first--;
					if (t[now.first][now.second] == 1)
					{
						c++;
						t[now.first][now.second] = 0;
					}
				}
				
			}
			else if (a == 'E')
			{
				F(0,x)
				{	
					now.first++;
					if (t[now.first][now.second] == 1)
					{
						c++;
						t[now.first][now.second] == 0;
					}
				}
				
			}
			else
			{
				F(0,x)
				{
					now.second--;
					if (t[now.first][now.second]==1)
					{
						c++;
						t[now.first][now.second] == 0;
					}
				}
				
			}
		}
		if (c == n)
		{
			cout << "Yes" << endl;
		}
		else
		{
			cout << "No" << endl;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:38: error: expected initializer before '\U0000ff1d\U0000ff5b\U0000ff5d'
   16 |                         int t[21][21]＝｛｝
      |                                      ^~~~~~
a.cc:24:25: error: 't' was not declared in this scope
   24 |                         t[x][y] = 1;
      |                         ^
a.cc:40:45: error: 't' was not declared in this scope
   40 |                                         if (t[now.first][now.second] == 1)
      |                                             ^
a.cc:54:45: error: 't' was not declared in this scope
   54 |                                         if (t[now.first][now.second] == 1)
      |                                             ^
a.cc:67:45: error: 't' was not declared in this scope
   67 |                                         if (t[now.first][now.second] == 1)
      |                                             ^
a.cc:80:45: error: 't' was not declared in this scope
   80 |                                         if (t[now.first][now.second]==1)
      |                                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int i, j, k;
  int q, w;
  int tempx, tempy, temp2, count;
  int N, M;
  char temp1;
  while(1){
    q = 10; w = 10; count = 0;
    int a[30][30] = {};
    cin>>N;
    if(N == 0) break;

    for(i = 0; i < N; i++){
      cin>>tempx>>tempy;
      a[tempx][tempy] = 1;
    cin>>M;

    if(a[w][q] == 1)count++;
    
    for(i = 0; i < M; i++){
      cin>>temp1>>temp2;
      if(temp1 == 'N') {
	for(j = 1; j <= temp2; j++){
	  q++;
	  if(a[w][q] == 1){
	    count++;
	     a[w][q] == 0;
	  }
	}
      }else if(temp1 == 'S'){
         for(j = 1; j <= temp2; j++){
	  q--;
	  if(a[w][q] == 1){
	    count++;
	     a[w][q] == 0;
	  }
	 }
	
      } else if(temp1 == 'E'){
	  for(j = 1; j <= temp2; j++){
  	   w++;
	   if(a[w][q] == 1){
	     count++;
	      a[w][q] == 0;
	   }
	  }
	
      } else if(temp1 == 'W'){
	 for(j = 1; j <= temp2; j++){
	  w--;
	  if(a[w][q] == 1){
	    count++;
	    a[w][q] == 0;
	  }
	
	 }
      }
	 
    }


    if(count == N)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;

    
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:71:2: error: expected '}' at end of input
   71 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() {
	int x = 10, y = 10, i, j;
	int n, X[10], Y[10], N, vn[10],flag;
	char dir[10];   //宝石個数n、移動回数N  
	while (1) {
		flag = 0;

		scanf_s("%d", &n);
		
		if (n == 0) {
			break;
		}
		for (i = 0; i < n; i++) {
			scanf_s("%d %d", &X[i], &Y[i]);
		}

		scanf("%d", &N);
		
		for (i = 0; i < N; i++) {
			scanf("%c %d", &dir[i], &vn[i]);
		}


		for (i = 0; i < n; i++) {
			for (j = 1; j <= vn[i]; j++) {
				if (dir[i] == 'N')
					y += 1;
				else if (dir[i] == 'E')
					x += 1;
				else if (dir[i] == 'S')
					y -= 1;
				else
					x -= 1;

				if (X[i] == x && Y[i] == y)
					flag += 1;



			}
			

		}
		if (flag == n)
			printf("Yes\n");
		else
			printf("No\n");
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
      |                 scanf
Language: C++

//#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() {
	int x = 10, y = 10, i, j;
	int n, X[10], Y[10], N, vn[10],flag;
	char dir[10];   //宝石個数n、移動回数N  
	while (1) {
		flag = 0;

		scanf_s("%d", &n);
		
		if (n == 0) {
			break;
		}
		for (i = 0; i < n; i++) {
			scanf_s("%d %d", &X[i], &Y[i]);
		}

		scanf("%d", &N);
		
		for (i = 0; i < N; i++) {
			scanf("%c %d", &dir[i], &vn[i]);
		}


		for (i = 0; i < n; i++) {
			for (j = 1; j <= vn[i]; j++) {
				if (dir[i] == 'N')
					y += 1;
				else if (dir[i] == 'E')
					x += 1;
				else if (dir[i] == 'S')
					y -= 1;
				else
					x -= 1;

				if (X[i] == x && Y[i] == y)
					flag += 1;



			}
			

		}
		if (flag == n)
			printf("Yes\n");
		else
			printf("No\n");
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
      |                 scanf
Language: C++

//#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() {
	int x = 10, y = 10, i, j;
	int n, X[10], Y[10], N, vn[10],flag;
	char dir[10];   //宝石個数n、移動回数N  
	while (1) {
		flag = 0;

		scanf("%d", &n);
		
		if (n == 0) {
			break;
		}
		for (i = 0; i < n; i++) {
			scanf_s("%d %d", &X[i], &Y[i]);
		}

		scanf("%d", &N);
		
		for (i = 0; i < N; i++) {
			scanf("%c %d", &dir[i], &vn[i]);
		}


		for (i = 0; i < n; i++) {
			for (j = 1; j <= vn[i]; j++) {
				if (dir[i] == 'N')
					y += 1;
				else if (dir[i] == 'E')
					x += 1;
				else if (dir[i] == 'S')
					y -= 1;
				else
					x -= 1;

				if (X[i] == x && Y[i] == y)
					flag += 1;



			}
			

		}
		if (flag == n)
			printf("Yes\n");
		else
			printf("No\n");
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   16 |                         scanf_s("%d %d", &X[i], &Y[i]);
      |                         ^~~~~~~
      |                         scanf