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

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

bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;//右手ならtrue
	else return false;
}
int main(){
	string s;
	while(cin>>s){
	if(s[0]=='#')break;
	int cnt=0;
	bool flag=or(s[0]);
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:6:6: error: expected unqualified-id before 'or' token
    6 | bool or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before 'or' token
   15 |         bool flag=or(s[0]);
      |                   ^~
a.cc:17:26: error: expected primary-expression before 'or' token
   17 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:18:22: error: expected primary-expression before 'or' token
   18 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;//右手ならtrue
	else return false;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s[0]=='#')break;
	int cnt=0;
	bool flag=or(s[0]);
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:5:6: error: expected unqualified-id before 'or' token
    5 | bool or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before 'or' token
   15 |         bool flag=or(s[0]);
      |                   ^~
a.cc:17:26: error: expected primary-expression before 'or' token
   17 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:18:22: error: expected primary-expression before 'or' token
   18 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;;;
bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;//右手ならtrue
	else return false;
};
int main(){
	string s;
	while(true){
	cin>>s;
	if(s[0]=='#')break;
	int cnt=0;
	bool flag=or(s[0]);
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:5:6: error: expected unqualified-id before 'or' token
    5 | bool or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before 'or' token
   15 |         bool flag=or(s[0]);
      |                   ^~
a.cc:17:26: error: expected primary-expression before 'or' token
   17 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:18:22: error: expected primary-expression before 'or' token
   18 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;//右手ならtrue
	return false;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s[0]=='#')break;
	int cnt=0;
	bool flag=or(s[0]);
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:5:6: error: expected unqualified-id before 'or' token
    5 | bool or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before 'or' token
   15 |         bool flag=or(s[0]);
      |                   ^~
a.cc:17:26: error: expected primary-expression before 'or' token
   17 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:18:22: error: expected primary-expression before 'or' token
   18 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
bool or(char x){
	//if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;//右手ならtrue
	return false;
}
int main(){
	string s;
	bool flag;
	while(true){
	cin>>s;
	if(s[0]=='#')break;
	int cnt=0;
	flag=or(s[0]);
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:5:6: error: expected unqualified-id before 'or' token
    5 | bool or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:16:14: error: expected primary-expression before 'or' token
   16 |         flag=or(s[0]);
      |              ^~
a.cc:18:26: error: expected primary-expression before 'or' token
   18 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:19:22: error: expected primary-expression before 'or' token
   19 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;
	return false;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s[0]=='#')break;
	int cnt=0;
	bool flag=or(s[0]);
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:5:6: error: expected unqualified-id before 'or' token
    5 | bool or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before 'or' token
   15 |         bool flag=or(s[0]);
      |                   ^~
a.cc:17:26: error: expected primary-expression before 'or' token
   17 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:18:22: error: expected primary-expression before 'or' token
   18 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
bool or(char x);
int main(){
	string s;
	while(true){
	cin>>s;
	if(s[0]=='#')break;
	int cnt=0;
	bool flag=or(s[0]);
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}
	bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m'){
	return true;
	}
	else {
	return false;
	}
}

Compiler output:
a.cc:5:6: error: expected unqualified-id before 'or' token
    5 | bool or(char x);
      |      ^~
a.cc: In function 'int main()':
a.cc:12:19: error: expected primary-expression before 'or' token
   12 |         bool flag=or(s[0]);
      |                   ^~
a.cc:14:26: error: expected primary-expression before 'or' token
   14 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:15:22: error: expected primary-expression before 'or' token
   15 |                 flag=or(s[i]);
      |                      ^~
a.cc: At global scope:
a.cc:21:14: error: expected unqualified-id before 'or' token
   21 |         bool or(char x){
      |              ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;
	return false;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s=="#")break;
	int cnt=0;
	bool flag=or(s[0]);
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:5:6: error: expected unqualified-id before 'or' token
    5 | bool or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before 'or' token
   15 |         bool flag=or(s[0]);
      |                   ^~
a.cc:17:26: error: expected primary-expression before 'or' token
   17 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:18:22: error: expected primary-expression before 'or' token
   18 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;
	return false;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s=="#")break;
	int cnt=0;
	bool flag;
	if(or(s[0]))flag=true;
	else flag=false;
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:5:6: error: expected unqualified-id before 'or' token
    5 | bool or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:16:12: error: expected primary-expression before 'or' token
   16 |         if(or(s[0]))flag=true;
      |            ^~
a.cc:19:26: error: expected primary-expression before 'or' token
   19 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:20:22: error: expected primary-expression before 'or' token
   20 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<string>
using namespace std;
bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;
	return false;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s=="#")break;
	int cnt=0;
	bool flag;
	if(or(s[0]))flag=true;
	else flag=false;
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:4:6: error: expected unqualified-id before 'or' token
    4 | bool or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:15:12: error: expected primary-expression before 'or' token
   15 |         if(or(s[0]))flag=true;
      |            ^~
a.cc:18:26: error: expected primary-expression before 'or' token
   18 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:19:22: error: expected primary-expression before 'or' token
   19 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<string>
using namespace std;
inline bool or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m')return true;
	return false;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s=="#")break;
	int cnt=0;
	bool flag;
	if(or(s[0]))flag=true;
	else flag=false;
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:4:13: error: expected unqualified-id before 'or' token
    4 | inline bool or(char x){
      |             ^~
a.cc: In function 'int main()':
a.cc:15:12: error: expected primary-expression before 'or' token
   15 |         if(or(s[0]))flag=true;
      |            ^~
a.cc:18:26: error: expected primary-expression before 'or' token
   18 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:19:22: error: expected primary-expression before 'or' token
   19 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<string>
using namespace std;
inline bool or(char n){
	//if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m'){return true;}
	return false;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s=="#")break;
	int cnt=0;
	bool flag;
	if(or(s[0]))flag=true;
	else flag=false;
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:4:13: error: expected unqualified-id before 'or' token
    4 | inline bool or(char n){
      |             ^~
a.cc: In function 'int main()':
a.cc:15:12: error: expected primary-expression before 'or' token
   15 |         if(or(s[0]))flag=true;
      |            ^~
a.cc:18:26: error: expected primary-expression before 'or' token
   18 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:19:22: error: expected primary-expression before 'or' token
   19 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<string>
using namespace std;
 int or(char n){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m'){return 1;}
	return 0;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s=="#")break;
	int cnt=0;
	bool flag;
	if(or(s[0]))flag=true;
	else flag=false;
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:4:6: error: expected unqualified-id before 'or' token
    4 |  int or(char n){
      |      ^~
a.cc: In function 'int main()':
a.cc:15:12: error: expected primary-expression before 'or' token
   15 |         if(or(s[0]))flag=true;
      |            ^~
a.cc:18:26: error: expected primary-expression before 'or' token
   18 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:19:22: error: expected primary-expression before 'or' token
   19 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<iostream>
#include<string>
using namespace std;
 int or(char x){
	if(x=='y'||x=='u'||x=='i'||x=='o'||x=='p'||x=='h'||x=='j'||x=='k'||x=='l'||x=='n'||x=='m'){return 1;}
	return 0;
}
int main(){
	string s;
	while(true){
	cin>>s;
	if(s=="#")break;
	int cnt=0;
	bool flag;
	if(or(s[0]))flag=true;
	else flag=false;
	for(int i=0;i<s.size();i++){
		if(flag!=or(s[i]))cnt++;
		flag=or(s[i]);
	}
	cout<<cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc:4:6: error: expected unqualified-id before 'or' token
    4 |  int or(char x){
      |      ^~
a.cc: In function 'int main()':
a.cc:15:12: error: expected primary-expression before 'or' token
   15 |         if(or(s[0]))flag=true;
      |            ^~
a.cc:18:26: error: expected primary-expression before 'or' token
   18 |                 if(flag!=or(s[i]))cnt++;
      |                          ^~
a.cc:19:22: error: expected primary-expression before 'or' token
   19 |                 flag=or(s[i]);
      |                      ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  
  string left="qwertasdfgzxcvb",right="yuiophjklnm";
  string in;

  while(1){
    cin >>in;
    if(in == "#")break;
    int cnt=0;
    int hand=-1;//left 1 right 2
    
    for(int i=0 ; i < (int)in.size() ; i++){
      
      char key=in[i];
      
      if(left.find(key) != -1 && hand != 1){
	cnt++;
	hand=1;
      }else if(right.find(key) != -1 && hand !=2){
      cnt++;
      hand=2;
    }
  }
  
    cout <<cnt-1<<endl;
  }

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

#! /usr/bin/python
# -*- coding: utf-8 -*-

L = "qwertasdfgzxcvb"
s = raw_input()
while s != "#":
    cnt = 0
    if s[0] in L:
        cur = "L"
    else:
        cur = "R"
    for i in range(len(s)):
        if s[i] in L:
            if cur != "L":
                cnt += 1
            cur = "L"
        else:
            if cur == "L":
                cnt += 1
            cur = "R"
    print cnt
    s = raw_input()

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #! /usr/bin/python
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: utf-8 -*-
      |   ^
a.cc:4:1: error: 'L' does not name a type
    4 | L = "qwertasdfgzxcvb"
      | ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string str, key="hijklmnopyu";
	while(1){
		str.clear();
		cin>>str;
		int ans=0;
		if(str=="#") break;
		
		bool f,s;
		f = (key.find(str[0]) != -1);
		
		for(int i=1;i<str.size();i++){
			s=(key,find(str[i])!=-1);
			if(f^s)ans++;
			f=s;
		}
		cout<<ans<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:36: error: no matching function for call to 'find(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   16 |                         s=(key,find(str[i])!=-1);
      |                                ~~~~^~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<stdio.h>

int key(char i){
	if(i == 'y') return 1;
	if(i == 'h') return 1;
	if(i == 'n') return 1;
	if(i == 'u') return 1;
	if(i == 'j') return 1;
	if(i == 'm') return 1;
	if(i == 'i') return 1;
	if(i == 'k') return 1;
	if(i == 'o') return 1;
	if(i == 'l') return 1;
	if(i == 'p') return 1;

	return 0;
}

int main(){
	char word[100][40];
	int i = 0,j,k;
	int left;
	int count = 0;

	while(1){
		scanf("%s",word[i]);
		if(word[i][0] == '#') break;
		i++;
	}

	for(j = 0; j < i; j++){
		left = key(word[j][0]);
		for(k = 1; word[j][k] != '\0'; k++){
			if(key(word[j][k]) == 1 && left == 0){
				count++;
				left = 1;
			}else if(key(word[j][k] != 1 && left != 0{
				count++;
				left = 0;
			}
		}
		printf("%d\n",count);
		count = 0;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:66: error: expected ')' before '{' token
   37 |                         }else if(key(word[j][k] != 1 && left != 0{
      |                                     ~                            ^
      |                                                                  )
a.cc:40:26: error: expected ')' before '}' token
   40 |                         }
      |                          ^
      |                          )
   41 |                 }
      |                 ~         
a.cc:37:33: note: to match this '('
   37 |                         }else if(key(word[j][k] != 1 && left != 0{
      |                                 ^
a.cc:41:17: error: expected primary-expression before '}' token
   41 |                 }
      |                 ^
Language: C++


#include <bits/stdc++.h>
using namespace std;
int main() {
    string str;
    while(cin>>str,str!="#"){
        int ans=-1;
        for(int i=0,now=2,num=0;i<str.size();i++){
            if(str[i]-'a'>'g'-'a'&&str[i]-'a'<'q'-'a'||str[i]=='u'||str[i]=='y')num=1;
            else num=0;
            if(now!=1&&num==1){
                ans++;
                now=1;
            }
            else if(now!=0&&num==0){
                ans++;
                now=0;
            }
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: expected '}' at end of input
   19 |         }
      |          ^
a.cc:6:29: note: to match this '{'
    6 |     while(cin>>str,str!="#"){
      |                             ^
a.cc:19:10: error: expected '}' at end of input
   19 |         }
      |          ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cmath>
#include<string.h>
#include<string>
using namespace std;

#define ll long long int
#define ld long double
#define reps(i,f,n) for(int i=f;i<n;i++)
#define rep(i,n) reps(i,0,n)
#define m1 cout<<"move1"<<endl
#define m2 cout<<"move2"<<endl
#define m3 cout<<"move3"<<endl
#define m4 cout<<"move4"<<endl

bool lr(char c){
  if(c<=103 || ( c>=113 && c<= 116) || (c >= 118 && c<=120) || c == 'z')
    return true;
  else
    return false;
}


int main(){
  char s[110];

  while(gets(s),s[0] != '#'){
    ll num = strlen(s);
    ll ans = 0;
    bool flag = true;

    flag = lr(s[0]);

    reps(i,1,num){
      if(lr(s[i]) != flag){
	  ans++;
	  flag = lr(s[i]);
	}
    }
    cout<<ans<<endl;
  }
  return 0;
}
	
	  
    
    
    
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   30 |   while(gets(s),s[0] != '#'){
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
using namespace std;
string leftkey="qwertasdfgzxcvb";
string s;
bool r,l;
int cnt;
int main(){
	while(1){
		cin >>s;
		if(s=="#")break;
		cnt=0;
		r=l=false;
		for(int i=0;i<s.size();i++){
			for(int j=0;j<leftkey.size();j++){
				if(s[i]==leftkey[j]){
					if(r&&!l)cnt++;
					l=true;
					r=false;
					break;
				}else if(j==leftkeyabracadabra.size()-1){
					if(!r&&l)cnt++;
					l=false;
					r=true;
				}
			}
		}
		cout << cnt<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:45: error: 'leftkeyabracadabra' was not declared in this scope
   20 |                                 }else if(j==leftkeyabracadabra.size()-1){
      |                                             ^~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
  string S, R = "yuiophjklnm";
  while (cin >> S, S != "#") {
    int ans = -1, s = 0, t, l;
    l = S.size();
    for (int i = 0; i < l; ++i) {
      if (find(R.begin(),R.end(),S[i]) != R.end()) t = 1;
      else t = -1;
      if (t != s) ++ans;
      s = t;
    }
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   10 |       if (find(R.begin(),R.end(),S[i]) != R.end()) t = 1;
      |           ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:10:15: note:   '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   10 |       if (find(R.begin(),R.end(),S[i]) != R.end()) t = 1;
      |           ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>

#include<string>

using namespace std;

int main(){

  while(1){

    string s;

    int count=0;

    cin >> s;

    int judge[10000]={};

    for(int i=0;i<s.size();i++){

      if((s[i]=='q')||(s[i]=='w')||(s[i]=='e')||(s[i]=='r')||(s[i]=='t')||(s[i]=='a')||(s[i]=='s')||(s[i]=='d')||(s[i]=='f')||(s[i]=='g')||(s[i]=='z')||(s[i]=='x')||(s[i]=='c')||(s[i]=='v')||(s[i]=='b'))judge[i]=0;

      else judge[i]=1;

      if((1<=i)&&(judge[i-1]!=judge[i])) count++;

    }

    if(s[0]=='#')break;

    cout << count << endl;

  }

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

#include<iostream>
#include<string>

using namespace std;

int main() {
    string rightc = "yuiophjklnm";

    while (1) {
        string s;
        cin >> s;

        if (s == "#") break;

        
        bool pright = count(rightc.begin(), rightc.end(), s[0]);

        int ans = 0;
        for (int i = 1; i < s.size(); ++i) {
            bool right = count(rightc.begin(), rightc.end(), s[i]);
            if (pright != right) {
                ans++;
                pright = right;
            }
        }

        cout << ans << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: 'count' was not declared in this scope
   16 |         bool pright = count(rightc.begin(), rightc.end(), s[0]);
      |                       ^~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

const char *leftc  = "qwertasdfgzxcvb";
const char *rightc = "yuiophjklnm";

int main(){
  char mapping[256];
  char buff[256];

  for(const char *c = leftc;  *c != '\0'; c++) mapping[*c] = 0;
  for(const char *c = rightc; *c != '\0'; c++) mapping[*c] = 1;

  while(gets(buff), buff[0] != '#'){
    int ans = 0;
    int length = strlen(buff);
    for(int i = 1; i < length; i++)
      if(mapping[buff[i]] != mapping[buff[i-1]])
        ans++;

    printf("%d\n", ans);
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   17 |   while(gets(buff), buff[0] != '#'){
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

const char *leftc  = "qwertasdfgzxcvb";
const char *rightc = "yuiophjklnm";

int main(){
  char mapping[256];
  char buff[256];

  for(char *c = leftc;  *c != '\0'; c++) mapping[*c] = 0;
  for(char *c = rightc; *c != '\0'; c++) mapping[*c] = 1;

  while(gets(buff), buff[0] != '#'){
    int ans = 0;
    int length = strlen(buff);
    for(int i = 1; i < length; i++)
      if(mapping[buff[i]] != mapping[buff[i-1]])
        ans++;

    printf("%d\n", ans);
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
   14 |   for(char *c = leftc;  *c != '\0'; c++) mapping[*c] = 0;
      |                 ^~~~~
      |                 |
      |                 const char*
a.cc:15:17: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
   15 |   for(char *c = rightc; *c != '\0'; c++) mapping[*c] = 1;
      |                 ^~~~~~
      |                 |
      |                 const char*
a.cc:17:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   17 |   while(gets(buff), buff[0] != '#'){
      |         ^~~~
      |         getw
Language: C++

#include<iostream>
#include <string>
#include <algorithm>
using namespace std;
bool isleft(char c)
{
	string right="qwertasdfgzxcvb";
	return find(right.begin(),right.end(),c)==right.end();
}
int main()
{
	string input;
	while(cin>>input){
		if(input=="#")break;
		bool curleft=isleft(input[0]);
		int ret=0;
		for(int i=1;i<input.size();i++){
			if(isfind(input[i])!=curleft)ret++;
			curleft=isfind(input[i]);
		}
		cout<<ret<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:28: error: 'isfind' was not declared in this scope
   18 |                         if(isfind(input[i])!=curleft)ret++;
      |                            ^~~~~~
a.cc:19:33: error: 'isfind' was not declared in this scope
   19 |                         curleft=isfind(input[i]);
      |                                 ^~~~~~
Language: C++


#include<iostream>
#include <string>
#include <algorithm>
using namespace std;
bool isleft(char c)
{
	string right="qwertasdfgzxcvb";
	return find(right.begin(),right.end(),c)==right.end();
}
int main()
{
	string input;
	while(cin>>input){
		if(input=="#")break;
		bool curleft=isleft(input[0]);
		int ret=0;
		for(int i=1;i<input.size();i++){
			if(isfind(input[i])!=curleft)ret++;
			curleft=isleft(input[i]);
		}
		cout<<ret<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: 'isfind' was not declared in this scope
   19 |                         if(isfind(input[i])!=curleft)ret++;
      |                            ^~~~~~
Language: Java

package main;

import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Scanner;

public class p2253 {
	public static void pr(Object o) {
		System.out.println(o);
	}

	public static class Point {
		int x;
		int y;

		public Point(){

		}
		public Point(int x,int y){
			this.x=Math.max(Math.min(x,30),-30);
			this.y=Math.max(Math.min(y,30),-30);
		}

		@Override
		public boolean equals(Object obj) {
			if (obj instanceof Point) {
				Point p = (Point) obj;
				return x == p.x && y == p.y;
			}
			return false;
		}
		public int hashCode(){
			return x+37*y;
		}
		public String toString(){
			return x+","+y;
		}
	}

	HashMap<Point, Integer> pmap;

	static Point[] dir;
	static{
		dir=new Point[]{
			new Point(1,0),
			new Point(1,1),
			new Point(0,1),
			new Point(-1,0),
			new Point(-1,-1),
			new Point(0,-1)};
	}
	int x, y;
	int t, n;
	int count;

	void move(Point p,int turn){
		if((pmap.get(p) ==null || pmap.get(p)>turn) && turn <=t){
			for(int i=0;i<6;i++){
				Point _p=new Point();
				_p.x=p.x+dir[i].x;
				_p.y=p.y+dir[i].y;
				move(_p,turn+1);
			}
			pmap.put(p,turn);
		}
	}
	public void run() {
		pmap=new HashMap<Point, Integer>();
		Scanner sc = new Scanner(System.in);
		while (true) {
			n = 0;
			pmap.clear();
			t = sc.nextInt();
			n = sc.nextInt();
			if (t == 0 && n == 0) {
				break;
			}
			for(int i=0;i<n;i++){
				Point p=new Point();
				p.x=sc.nextInt();
				p.y=sc.nextInt();
				pmap.put(p,-2);
			}
			Point zero=new Point();
			zero.x=sc.nextInt();
			zero.y=sc.nextInt();
			move(zero,0);
			count=0;
			for(Entry<Point, Integer> p : pmap.entrySet()){
				if(p.getValue()>=0){
					count++;
				}
			}
			pr(count);
		}
	}

	public static void main(String[] args) {
		new p2253().run();
	}
}

Compiler output:
Main.java:7: error: class p2253 is public, should be declared in a file named p2253.java
public class p2253 {
       ^
1 error
Language: Java

	public static void main(String[] arg) {
		Scanner in = new Scanner(System.in);
		while (in.hasNext()) {
			int life = in.nextInt() + 1;
			int n = in.nextInt();
			if (life == 0 && n == 0) {
				break;
			}
			int[][] map = new int[MAP_SIZE * 2 + 1][MAP_SIZE * 2 + 1];
			for (int i = 0; i < n; i++) {
				int x = in.nextInt() + MAP_SIZE;
				int y = in.nextInt() + MAP_SIZE;
				map[x][y] = BLOCK;
			}
			int x = 0, y = 0;
			try {
				x = in.nextInt() + MAP_SIZE;
				y = in.nextInt() + MAP_SIZE;
				System.out.println(setMove(map, x, y, life));
			} catch (Exception e) {
				throw new RuntimeException(x + ":" + y + "\n" + showMap(map));
			}
		}
		in.close();
	}

	private static String showMap(int[][] map) {
		StringBuilder sb = new StringBuilder();
		int sp = 0;
		for (int[] line : map) {
			for (int i = 0; i < MAP_SIZE * 2 - sp; i++) {
				sb.append("  ");
			}
			sp++;
			for (int i : line) {
				sb.append(String.format("[%2d]", i));
			}
			sb.append("\r\n");
		}
		return sb.toString();
	}

	static int setMove(int[][] map, int x, int y, int t) {
		int count = 0;
		if (map[x][y] < t) {
			if (map[x][y] == 0) {
				count++;
			}
			map[x][y] = t;
		} else {
			return 0;
		}
		// System.out.print("x=" + (x - 30) + " y=" + (y - 30) + " " +
		// map[x][y]);
		// System.out.println("=>" + t);
		if (--t > 0) {
			count += setMove(map, x, y - 1, t);
			count += setMove(map, x, y + 1, t);
			count += setMove(map, x - 1, y, t);
			count += setMove(map, x + 1, y, t);
			count += setMove(map, x - 1, y - 1, t);
			count += setMove(map, x + 1, y + 1, t);
		}
		return count;
	}
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] arg) {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:66: error: class, interface, enum, or record expected
}
^
2 errors
Language: C

#include <stdio.h>
#include <string.h>
#include <queue>
#include <utility>
#define S 30

using namespace std;

int main(void){
	int i, j, x, y, sx, sy, t, n, f[S * 2 + 1][S * 2 + 1], ans, dx[6] = {1,1,0,-1,-1,0}, dy[6] = {1,0,-1,-1,0,1};
	queue<pair<int,int> > que;
	while(1){
		scanf("%d%d",&t,&n);
		if(!t && !n) break;
		memset(f,0,sizeof(f));
		for(i = 0;i < n;i++){
			scanf("%d%d",&x,&y);
			f[x + S][y + S] = -1;
		}
		scanf("%d%d",&sx,&sy);
		que.push(pair<int,int>(sx + S,sy + S));
		while(que.size()){
			x = que.front().first, y = que.front().second;
			que.pop();
			if(f[x][y] >= t) continue;
			for(i = 0;i < 6;i++){
				if(0 <= x + dx[i] && x + dx[i] <= S * 2 && 0 <= y + dy[i] && y + dy[i] <= S * 2 && f[x + dx[i]][y + dy[i]] == 0){
					f[x + dx[i]][y + dy[i]] = f[x][y] + 1;
					que.push(pair<int,int>(x + dx[i],y + dy[i]));
				}
			}
		}
		f[sx + S][sy + S] = 0;
		ans = 1;
		for(i = 0;i <= S * 2;i++)
			for(j = 0;j <= S * 2;j++) if(f[i][j] > 0) ans++;
		printf("%d\n",ans);
	}
	return 0;
}

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

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

int foo(int map[200][200], int x, int y, int t){//if(!map[y][x])cout<<t<<" "<<y<<" "<<x<<" "<<map[y][x]<<endl;
	if(map[y][x]==-1)return 0;
	if(map[y][x] >= t+1)return 0;
	int ans = (map[y][x]==0);
	if(!t){map[y][x]=t+1;return ans;}
	map[y][x] = t+1;
	for(int i = -1; i <= 1; i++){
		for(int j = -1; j <= 1; j++){
			if((i==1&&j==-1)||(i==-1&&j==1)||(i==0&&j==0))continue;
			//cout<<i<<" "<<j<<endl;
			ans += foo(map,x+i,y+j,t-1);
		}
	}
	return ans;
}

int main(){
	while(1){
		int t, n, map[100][100] = {},x,y;
		cin>>t>>n;
		if(!t&&!n)break;
		for(int i = 1; i <= n; i++){
			cin>>x>>y;
			map[y+40][x+40] = -1;
		}
		cin>>x>>y;
		cout<<foo(map,40+x,40+y,t)<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:27: error: cannot convert 'int (*)[100]' to 'int (*)[200]'
   30 |                 cout<<foo(map,40+x,40+y,t)<<endl;
      |                           ^~~
      |                           |
      |                           int (*)[100]
a.cc:4:13: note:   initializing argument 1 of 'int foo(int (*)[200], int, int, int)'
    4 | int foo(int map[200][200], int x, int y, int t){//if(!map[y][x])cout<<t<<" "<<y<<" "<<x<<" "<<map[y][x]<<endl;
      |         ~~~~^~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<queue>
using namespace std;
typedef pair<int,int> pii;
typedef pair<int,pii> piii;
int dx[6]={1,1,0,-1,-1,0},dy[6]={1,0,-1,-1,0,1};

int grid[200][200];
int t,n;

piii makePiii(int a,int b,int c){
  pii A=make_pair(b,c);
  piii res=make_pair(a,A);
  return res;
}

int bfs(int sx,int sy){
  int res=1;
  queue<piii> q;
  q.push(makePiii(0,sx,sy));
  while(!q.empty() && q.front().first < t){
    int x=q.front().second.first;
    int y=q.front().second.second;
    int cnt=q.front().first;
    q.pop();

    //cout << "cnt:" << cnt << " q.size:" << q.size()<< endl;

    for(int i=0;i<6;i++){
    int nx = x + dx[i];
    int ny = y + dy[i];
      if(0 <= nx && nx <= 60 && 
	 0 <= ny && ny <= 60 &&
	 grid[ny][nx]==0){
	//cout << "nx:" << nx << " ny:" << ny << endl;
	res++;
	q.push(makePiii(cnt+1,nx,ny));
	grid[ny][nx]=-1;
      }
    }
  }
return res;
}

int main(){
    while(cin>>t>>n){
      if(t==0 && n==0)break;
      memset(grid,0,sizeof(grid));
      for(int i=0;i<n;i++){
	int x,y;
	cin>>x>>y;
	grid[y+30][x+30]=-1;
      }
      int sx,sy;
      cin>>sx>>sy;
      grid[sy+30][sx+30]=-1;
      cout <<  bfs(sx+30,sy+30) << endl;
    }
    return 0;
  }

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

#include<iostream>
#include<queue>
using namespace std;
typedef pair<int,int> pii;
typedef pair<int,pii> piii;
int dx[6]={1,1,0,-1,-1,0},dy[6]={1,0,-1,-1,0,1};

int grid[61][61];
int t,n;

piii makePiii(int a,int b,int c){
  pii A=make_pair(b,c);
  piii res=make_pair(a,A);
  return res;
}

int bfs(int sx,int sy){
  int res=1;
  queue<piii> q;
  q.push(makePiii(0,sx,sy));
  while(!q.empty() && q.front().first < t){
    int x=q.front().second.first;
    int y=q.front().second.second;
    int cnt=q.front().first;
    q.pop();

    //cout << "cnt:" << cnt << " q.size:" << q.size()<< endl;

    for(int i=0;i<6;i++){
    int nx = x + dx[i];
    int ny = y + dy[i];
      if(0 <= nx && nx <= 60 && 
	 0 <= ny && ny <= 60 &&
	 grid[ny][nx]==0){
	cout << "nx:" << nx << " ny:" << ny << endl;
	res++;
	q.push(makePiii(cnt+1,nx,ny));
	grid[ny][nx]=-1;
      }
    }
  }
return res;
}

int main(){
    while(cin>>t>>n){
      if(t==0 && n==0)break;
      memset(grid,0,sizeof(grid));
      for(int i=0;i<n;i++){
	int x,y;
	cin>>x>>y;
	grid[y+30][x+30]=-1;
      }
      int sx,sy;
      cin>>sx>>sy;
      grid[sy+30][sx+30]=-1;
      cout <<  bfs(sx+30,sy+30) << endl;
    }
    return 0;
  }

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

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <functional>
#include <map>
#include <queue>
#include <tuple>

using namespace std;

#define For(i,a,b) for(int i = a;i < b;i++)
#define rep(i,n) For(i,0,n)
#define clr(n) memset(n,0,sizeof(n))

int dx[6] = { 0, -1, -1, 0, 1, 1 }, dy[6] = { 1, 0, -1, -1, 0, 1 };
bool cheak(int x, int y, int mx, int my){ return x >= 0 && y >= 0 && x < mx && y < my; }
typedef pair<int, int> P;
typedef tuple<int, int, int> T;

int main(){

	int t, n;

	while (cin >> t >> n && t){

		const int M = 50;
		int d[M * 3][M * 3]; clr(d);
		bool f[M * 3][M * 3]; clr(f);

		rep(i, n){
			int x, y;
			cin >> x >> y;
			d[y + M][x + M] = 1;
		}

		int sx,sy;
		cin >> sx >> sy;
		sx += M, sy += M;

		queue<T> q;
		q.push(T(sy, sx, 0));
		f[sy][sx] = true;

		while (q.size()){

			T nx = q.front(); q.pop();

			rep(i, 6){
				int ty = get<0>(nx) + dy[i], tx = get<1>(nx) + dx[i];

				if (!d[ty][tx] && !f[ty][tx] && get<2>(nx) < t){
					f[ty][tx] = true;
					q.push(T(ty, tx, get<2>(nx)+1));
				}

			}

		}

		int ans = 0;
		rep(i, M * 3)rep(j, M * 3){
			if (f[i][j])ans++;
		}

		cout << ans << endl;


	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: 'memset' was not declared in this scope
   15 | #define clr(n) memset(n,0,sizeof(n))
      |                ^~~~~~
a.cc:29:38: note: in expansion of macro 'clr'
   29 |                 int d[M * 3][M * 3]; clr(d);
      |                                      ^~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <queue>
  +++ |+#include <cstring>
    9 | #include <tuple>
Language: C++

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

int x[200][200];
int y[200][200];
int n, k, a, b, X, Y;
int dx[6] = { 0,1,1,0,-1,-1 };
int dy[6] = { 1,1,0,-1,-1,0 };

int main() {
	while (true) {
		cin >> n >> k;
		if (n == 0 && k == 0) { break; }
		for (int i = 0; i < 200; i++) {
			for (int j = 0; j < 200; j++) {
				x[i][j] = 1145141919;
			}
		}
		for (int i = 0; i < k; i++) {
			cin >> a >> b;
			x[a + 100][b + 100] = 1;
		}
		cin >> X >> Y;
		y[X + 100][Y + 100] = 0;
		for (int i = 0; i < 100; i++) {
			for (int j = 1; j < 199; j++) {
				for (int k = 1; k < 199; k++) {
					if (x[j][k] == 0 && y[j][k] < 1145141919) {
						for (int l = 0; l < 6; l++) {
							y[dx[l] + j][dy[l] + k] = min(y[dx[l] + j][dy[l] + k], y[j][k] + 1);
						}
					}
				}
			}
		}
		int sum = 0;
		for (int i = 0; i < 200; i++) {
			for (int j = 0; j < 200; j++) {
				if (y[i][j] <= t) {
					sum++;
				}
			}
		}
		cout << sum << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:48: error: 't' was not declared in this scope
   40 |                                 if (y[i][j] <= t) {
      |                                                ^
Language: C++

#include <iostream>
#include <queue>
#include <utility>
#define MAX 60
using namespace std;

typedef pair<int,int> P;
int stage[MAX+1][MAX+1];
int d[MAX+1][MAX+1];

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

void clear(){
	for(int i = 0;i < MAX+1;i++){
		for(int j = 0;j < MAX+1;j++){
			d[i][j] = 0;
			stage[i][j] = 0;
		}
	}
}
void s(queue<P>,int turn);
int sum(){
	int res = 0;
	for(int i = 0;i < MAX+1;i++){
		for(int j = 0;j < MAX+1;j++){
			if(d[i][j] == 1) res++;
		}
	}
	return res;
}

int main() {
	int t,n,sX,sY,x,y;
	while(1){
		clear();
		//input
		cin >> t >> n;
		if(t == 0 && n == 0) break;
		for(int i=0;i<s;i++){
			cin >> x >> y;
			stage[x+30][y+30] = 1;
		}
		cin >> sX >> sY;
		//input end
		queue<P> que;
		que.push(P(sX+30,sY+30)); 
		d[sX+30][sY+30] = 1;
		s(que,t);
		que.pop();
		cout << sum() << endl;
	}
	return 0;
}

void s(queue<P> que1,int turn){
	if(turn == 0) return;
	queue<P> que2;
	while(!que1.empty()){
		P xy = que1.front();
		que1.pop();
		int x = xy.first,y = xy.second;
		for(int i = 0;i < 6;i++){
			if(stage[x+dx[i]][y+dy[i]] == 0 && d[x+dx[i]][y+dy[i]] == 0){
				d[x+dx[i]][y+dy[i]] = 1;
				que2.push(P(x+dx[i],y+dy[i]));
			}
		}
	}
	
	s(que2,turn-1);
	return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   40 |                 for(int i=0;i<s;i++){
      |                             ~^~
Language: C++

#include <iostream>
#include <queue>
#include <utility>
#define MAX 60
using namespace std;

typedef pair<int,int> P;
int stage[MAX+1][MAX+1];
int d[MAX+1][MAX+1];

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

void clear(){
	for(int i = 0;i < MAX+1;i++){
		for(int j = 0;j < MAX+1;j++){
			d[i][j] = 0;
			stage[i][j] = 0;
		}
	}
}
void s(queue<P>,int turn);
int sum(){
	int res = 0;
	for(int i = 0;i < MAX+1;i++){
		for(int j = 0;j < MAX+1;j++){
			if(d[i][j] == 1) res++;
		}
	}
	return res;
}

int main() {
	int t,n,sX,sY,x=0,y=0,i;
	while(1){
		clear();
		//input
		cin >> t >> n;
		if(t == 0 && n == 0) break;i=0;
		do{i++;
			cin >> x >> y;
			stage[x+30][y+30] = 1;
		}while(i<n-1)
		cin >> sX >> sY; 
		//input end
		queue<P> que;
		que.push(P(sX+30,sY+30)); 
		d[sX+30][sY+30] = 1;
		s(que,t);
		que.pop();
		cout << sum() << endl;
	}
	return 0;
}

void s(queue<P> que1,int turn){
	if(turn == 0) return;
	queue<P> que2;
	while(!que1.empty()){
		P xy = que1.front();
		que1.pop();
		int x = xy.first,y = xy.second;
		for(int i = 0;i < 6;i++){
			if(stage[x+dx[i]][y+dy[i]] == 0 && d[x+dx[i]][y+dy[i]] == 0){
				d[x+dx[i]][y+dy[i]] = 1;
				que2.push(P(x+dx[i],y+dy[i]));
			}
		}
	}
	
	s(que2,turn-1);
	return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:30: error: expected ';' before 'cin'
   43 |                 }while(i<n-1)
      |                              ^
      |                              ;
   44 |                 cin >> sX >> sY;
      |                 ~~~
Language: C++

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

//define
#define ALL(a) a.begin(),a.end()
#define REP(i,n) for(int i=0;i<n;i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define debug(x) if(1) cout<<#x<<":"<<x<<endl;
#define DEBUG(x) if(1) cout<<#x<<":"<<x<<endl;
#define ll long long

//constant
const int MOD=1000000007;
const int INF=INT_MAX/3-1;
const double EPS=1e-9;
const int dx4[]={1,0,-1,0};
const int dy4[]={0,1,0,-1};

//typedef
typedef vector<int> vi;
typedef vector<vector<int>> vvi;

bool isRange(int x,int y){
    return 0<=x && x<=60 && 0<=y && y<=60;

}

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

int main(){
    int n,t;
    while(cin>>t>>n,t){
        vvi ob(61,vi(61,0));
        vvi iscan(61,vi(61,0));
        int x,y;
        REP(i,n) cin>>x>>y,ob[x+30][y+30]=1;
        cin>>x>>y;
        queue<tuple<int,int,int>> q;
        q.push(make_tuple(x+30,y+30,0));
        while(!q.empty()){
            auto now=q.front();
            q.pop();
            int x=get<0>(now);
            int y=get<1>(now);
            int turn=get<2>(now);
            iscan[x][y]=1;
            if(turn>=t)
                continue;
            REP(i,6){
             int nx=x+dx[i];
             int ny=y+dy[i];
             if(isRange(nx,ny)）
 　　　　　if(!ob[nx][ny]&&!iscan[nx][ny])
                q.push(make_tuple(nx,ny,turn+1));
            }
        }
      int cnt=0;
        REP(i,61)
            REP(j,61)
                if(iscan[i][j])
                    cnt++;
        cout<<cnt<<endl;


    }


}


                   

Compiler output:
a.cc:54:2: error: extended character 　 is not valid in an identifier
   54 |  　　　　　if(!ob[nx][ny]&&!iscan[nx][ny])
      |  ^
a.cc:54:2: error: extended character 　 is not valid in an identifier
a.cc:54:2: error: extended character 　 is not valid in an identifier
a.cc:54:2: error: extended character 　 is not valid in an identifier
a.cc:54:2: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:53:31: error: expected ';' before '\U0000ff09'
   53 |              if(isRange(nx,ny)）
      |                               ^~
      |                               ;
a.cc:56:13: error: expected primary-expression before '}' token
   56 |             }
      |             ^
a.cc:55:50: error: expected ')' before '}' token
   55 |                 q.push(make_tuple(nx,ny,turn+1));
      |                                                  ^
      |                                                  )
   56 |             }
      |             ~                                     
a.cc:53:16: note: to match this '('
   53 |              if(isRange(nx,ny)）
      |                ^
a.cc:56:13: error: expected primary-expression before '}' token
   56 |             }
      |             ^
Language: C++

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

//define
#define ALL(a) a.begin(),a.end()
#define REP(i,n) for(int i=0;i<n;i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define debug(x) if(1) cout<<#x<<":"<<x<<endl;
#define DEBUG(x) if(1) cout<<#x<<":"<<x<<endl;
#define ll long long

//constant
const int MOD=1000000007;
const int INF=INT_MAX/3-1;
const double EPS=1e-9;
const int dx4[]={1,0,-1,0};
const int dy4[]={0,1,0,-1};

//typedef
typedef vector<int> vi;
typedef vector<vector<int>> vvi;

bool isRange(int x,int y){
    return 0<=x && x<=60 && 0<=y && y<=60;

}

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

int main(){
    int n,t;
    while(cin>>t>>n,t){
        vvi ob(61,vi(61,0));
        vvi iscan(61,vi(61,0));
        int x,y;
        REP(i,n) cin>>x>>y,ob[x+30][y+30]=1;
        cin>>x>>y;
        queue<tuple<int,int,int>> q;
        q.push(make_tuple(x+30,y+30,0));
        while(!q.empty()){
            auto now=q.front();
            q.pop();
            int x=get<0>(now);
            int y=get<1>(now);
            int turn=get<2>(now);
            iscan[x][y]=1;
            if(turn>=t)
                continue;
            REP(i,6){
             int nx=x+dx[i];
             int ny=y+dy[i];
             if(isRange(nx,ny))
 　　　　　if(!ob[nx][ny]&&!iscan[nx][ny])
                q.push(make_tuple(nx,ny,turn+1));
            }
        }
      int cnt=0;
        REP(i,61)
            REP(j,61)
                if(iscan[i][j])
                    cnt++;
        cout<<cnt<<endl;


    }


}


                   

Compiler output:
a.cc:54:2: error: extended character 　 is not valid in an identifier
   54 |  　　　　　if(!ob[nx][ny]&&!iscan[nx][ny])
      |  ^
a.cc:54:2: error: extended character 　 is not valid in an identifier
a.cc:54:2: error: extended character 　 is not valid in an identifier
a.cc:54:2: error: extended character 　 is not valid in an identifier
a.cc:54:2: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:54:2: error: '\U00003000\U00003000\U00003000\U00003000\U00003000if' was not declared in this scope
   54 |  　　　　　if(!ob[nx][ny]&&!iscan[nx][ny])
      |  ^~~~~~~~~~~~