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

#include <iostream>
#include <cstdio>
#include <cctype>
using namespace std;

int main()
{
	string s;
	int a,b,i;
	cin>>a>>b;
	cin>>s;
	
	if(a+b+1!=s.size())
	{
		cout<<"No"<<endl;
		return 0;
	}
	for(i=0;i<s.size();i++){
	{
		if(i!=a)
		if(!isdigit(s[i])){
		cout<<"No"<<endl;
		return 0;}
	}
	else
	if('-'!=s[i]){
	cout<<"No"<<endl;
	return 0;}}
	
	cout<<"Yes"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'else' without a previous 'if'
   25 |         else
      |         ^~~~
Language: C++

#include<iostream>
#include<cctype>
using namespace std;
int main(){
	int a,b;
	string s;
	cin>>a>>b>>s;
	if(s.size()!=a+b+1){
		cout<<"No";return 0;
	}
	for(int i=0;i<s.size();i++){
		if(i<=a){
			if(!isdigti(s[i])){
				cout<<"No";
				return 0;
			}
		}
		else{
			if(s[i]!='-'){
				cout<<"No";
				return 0;
			}
		}
	}
	cout<<yes;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: 'isdigti' was not declared in this scope; did you mean 'isdigit'?
   13 |                         if(!isdigti(s[i])){
      |                             ^~~~~~~
      |                             isdigit
a.cc:25:15: error: 'yes' was not declared in this scope
   25 |         cout<<yes;
      |               ^~~
Language: C++

#include <iostream>
#include<sstream>
#include<vector>
#include<iterator>
#include<alforithm>
using namespace std;

int main(void)
{
	int A, B;
	cin >> A >> B;

	string S;
	cin >> S;

	const string num = "0123456789";
	string ret = "Yes";
	for(int i=0; i<S.size(); i++){
		if(i == A){
			if(S[i] != '-')
				ret = "No";
		}
		else if(find(num.begin(), num.end(), S[i]) == num.end())
			ret = "No";
	}

	cout << ret << endl;

	return 0;
}


Compiler output:
a.cc:5:9: fatal error: alforithm: No such file or directory
    5 | #include<alforithm>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include<sstream>
#include<vector>
#include<iterator>
using namespace std;

int main(void)
{
	int A, B;
	cin >> A >> B;

	string S;
	cin >> S;

	const string num = "0123456789";
	string ret = "Yes";
	for(int i=0; i<S.size(); i++){
		if(i == A){
			if(S[i] != '-')
				ret = "No";
		}
		else if(find(num.begin(), num.end(), S[i]) == num.end())
			ret = "No";
	}

	cout << ret << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::const_iterator, std::__cxx11::basic_string<char>::const_iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   22 |                 else if(find(num.begin(), num.end(), S[i]) == num.end())
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:22:29: note:   '__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   22 |                 else if(find(num.begin(), num.end(), S[i]) == num.end())
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string a;
  int i,j,l,m,n,f=0;
  int m,n;
  cin>>m>>n;
  cin>>a;
  for(i=0;i<a.size();i++)
  {
     if(a[i]=='-')
        f=1;
      else if(f==1&&a[i]>='0'&&a[i]<='9')
      f=2;

  }
    if(f==2)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int m'
    7 |   int m,n;
      |       ^
a.cc:6:13: note: 'int m' previously declared here
    6 |   int i,j,l,m,n,f=0;
      |             ^
a.cc:7:9: error: redeclaration of 'int n'
    7 |   int m,n;
      |         ^
a.cc:6:15: note: 'int n' previously declared here
    6 |   int i,j,l,m,n,f=0;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string a;
  int i,j,l,m,n,f=0;
  int m,n;
  cin>>m>>n;
  cin>>a;
  for(i=0;i<a.size();i++)
  {
     if(a[i]=='-')
        f=1;
      else if(f==1&&a[i]>=0&&a[i]<='9')
      f=2;

  }
    if(f==2)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int m'
    7 |   int m,n;
      |       ^
a.cc:6:13: note: 'int m' previously declared here
    6 |   int i,j,l,m,n,f=0;
      |             ^
a.cc:7:9: error: redeclaration of 'int n'
    7 |   int m,n;
      |         ^
a.cc:6:15: note: 'int n' previously declared here
    6 |   int i,j,l,m,n,f=0;
      |               ^
Language: C++

#include<cstdio>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<set>
#include<map>
#include<queue>
#include<vector>
#include<algorithm>
#include<cctype>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<stack>
#include<ctime>
#define mst(a,b) memset(a,b,sizeof(a));
const int N = 1e9;
const int mod=(int)1e9+7;
const int INF=0x3f3f3f3f;
typedef long long LL;
//#define LOCAL
const double PI = acos(-1.0);
const int maxn=1e5+5;
char s[100];
using namespace std;


bool cmp(int a, int b)
{
    return a>b;
}

int gcd(int a, int b)
{
    return (b==0)?a:gcd(b,a%b);
}


#define ALL(x) x.begin(),x.end()
#define INS(x) inserter(x,x.begin())

int main()
{
#ifdef LOCAL
    freopen("test.txt", "r", stdin);
#endif // LOCAL
    int a, b;
    int i, j;
    bool is;
    is = false;
    scanf("%d%d", &a, &b);
    gets(s);
    int len = strlen(s);
    if(len!=a+b+1) printf("No");
    else
    {
        for(i = 0; i < len;i++)
        {
            if(s[i]=='-') {is = true;break;}
        }
        if(is)
        {
            for(j = i+1; j < len; j++) if(!isdigit(s[j])){is = false;break;}
        }
        if(!is) printf("No");
        else printf("Yes");
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   53 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

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

#define rep(i,n) FOR(i,0,n)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ROF(i,a,b) for(int i=(a)-1;i>=(b);i--)
#define all(a) (a).begin(),(a).end()
#define UNIQUE(v) v.erase(unique(all(v)),v.end())
#define SUM(a) accumlate(all(a),0)
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef long long ll;

main(){
  int a,b; cin >> a >> b;
  string s; cin >> s;
  rep(i,s.size()){
    if(i < a && '0' <= s[i] && s[i] <= '9') continue;
    else if(i == a && s[i] == '-') continue;
    else if(a < i && '0' <= s[i] && s[i] <= '9') continue;
    else{
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | w#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'w' does not name a type
    1 | w#include<bits/stdc++.h>
      | ^
a.cc:10:9: error: 'vector' does not name a type
   10 | typedef vector<int> vi;
      |         ^~~~~~
a.cc:11:9: error: 'vector' does not name a type
   11 | typedef vector<vi> vii;
      |         ^~~~~~
a.cc:12:9: error: 'vector' does not name a type
   12 | typedef vector<string> vs;
      |         ^~~~~~
a.cc:13:9: error: 'pair' does not name a type
   13 | typedef pair<int,int> pii;
      |         ^~~~
a.cc:16:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   16 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:17:12: error: 'cin' was not declared in this scope
   17 |   int a,b; cin >> a >> b;
      |            ^~~
a.cc:18:3: error: 'string' was not declared in this scope
   18 |   string s; cin >> s;
      |   ^~~~~~
a.cc:18:20: error: 's' was not declared in this scope
   18 |   string s; cin >> s;
      |                    ^
a.cc:24:7: error: 'cout' was not declared in this scope
   24 |       cout << "No\n";
      |       ^~~~
a.cc:28:3: error: 'cout' was not declared in this scope
   28 |   cout << "Yes\n";
      |   ^~~~
Language: Java



import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception {
        int[] arr = inputval();
        int A, B;
        String S;
        A = arr[0];
        B = arr[1];
        S = br.readLine().trim();
        String str = "No";

        for (int i = 0; i < A + B + 1; i++) {
            if (i == A) {
                if (S.charAt(i) != '-') break;
            }else{
                if(!('0' <= S.charAt(i) && S.charAt(i) <= '9')) break;
            }
            if(i==A+B) str = "Yes";
        }
        System.out.println(str);
    }


    static int[] inputval() throws Exception {
        String[] strarray = br.readLine().trim().split(" ");
        int[] intarray = new int[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    }

    static void array_sout(int[][] array) {
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[0].length; j++) {
                System.out.print(array[i][j] + " ");
            }
            System.out.println();
        }
    }

    static void array_sout(int[] array) {
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i] + " ");
        }
        System.out.println();
    }
}

Compiler output:
Main.java:6: error: '{' expected
public class Main
                 ^
Main.java:9: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args) throws Exception {
                  ^
  (use --enable-preview to enable unnamed classes)
Main.java:54: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<iostream>
#define no cout<<“No“;return 0;
using namespace std;
int main(){
int a,b;
cin>>a>>b;
for(int i=0;i<a+b+1;i++){
char c;
cin>>c;
if(i==a){if(c!=‘-‘){no;}}
else{if(c<‘0‘||‘9‘<c){no;}}
}
cout<<“Yes“;
}

Compiler output:
a.cc:2:18: error: extended character “ is not valid in an identifier
    2 | #define no cout<<“No“;return 0;
      |                  ^
a.cc:2:18: error: extended character “ is not valid in an identifier
a.cc:10:16: error: extended character ‘ is not valid in an identifier
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                ^
a.cc:10:18: error: extended character ‘ is not valid in an identifier
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                  ^
a.cc:11:11: error: extended character ‘ is not valid in an identifier
   11 | else{if(c<‘0‘||‘9‘<c){no;}}
      |           ^
a.cc:11:11: error: extended character ‘ is not valid in an identifier
a.cc:11:16: error: extended character ‘ is not valid in an identifier
   11 | else{if(c<‘0‘||‘9‘<c){no;}}
      |                ^
a.cc:11:16: error: extended character ‘ is not valid in an identifier
a.cc:13:7: error: extended character “ is not valid in an identifier
   13 | cout<<“Yes“;
      |       ^
a.cc:13:7: error: extended character “ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:10:16: error: '\U00002018' was not declared in this scope
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                ^
a.cc:2:18: error: '\U0000201cNo\U0000201c' was not declared in this scope
    2 | #define no cout<<“No“;return 0;
      |                  ^~~~
a.cc:10:21: note: in expansion of macro 'no'
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                     ^~
a.cc:11:11: error: '\U000020180\U00002018' was not declared in this scope
   11 | else{if(c<‘0‘||‘9‘<c){no;}}
      |           ^~~
a.cc:11:16: error: '\U000020189\U00002018' was not declared in this scope
   11 | else{if(c<‘0‘||‘9‘<c){no;}}
      |                ^~~
a.cc:2:18: error: '\U0000201cNo\U0000201c' was not declared in this scope
    2 | #define no cout<<“No“;return 0;
      |                  ^~~~
a.cc:11:23: note: in expansion of macro 'no'
   11 | else{if(c<‘0‘||‘9‘<c){no;}}
      |                       ^~
a.cc:13:7: error: '\U0000201cYes\U0000201c' was not declared in this scope
   13 | cout<<“Yes“;
      |       ^~~~~
Language: C++

#include<iostream>
#define no cout<<“No”;return 0;
using namespace std;
int main(){
int a,b;
cin>>a>>b;
for(int i=0;i<a+b+1;i++){
char c;
cin>>c;
if(i==a){if(c!=‘-‘){no;}}
else{if(c<‘0’||’9’<c){no;}}
}
cout<<“Yes”;
}

Compiler output:
a.cc:2:18: error: extended character “ is not valid in an identifier
    2 | #define no cout<<“No”;return 0;
      |                  ^
a.cc:2:18: error: extended character ” is not valid in an identifier
a.cc:10:16: error: extended character ‘ is not valid in an identifier
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                ^
a.cc:10:18: error: extended character ‘ is not valid in an identifier
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                  ^
a.cc:11:11: error: extended character ‘ is not valid in an identifier
   11 | else{if(c<‘0’||’9’<c){no;}}
      |           ^
a.cc:11:11: error: extended character ’ is not valid in an identifier
a.cc:11:16: error: extended character ’ is not valid in an identifier
   11 | else{if(c<‘0’||’9’<c){no;}}
      |                ^
a.cc:11:16: error: extended character ’ is not valid in an identifier
a.cc:13:7: error: extended character “ is not valid in an identifier
   13 | cout<<“Yes”;
      |       ^
a.cc:13:7: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:10:16: error: '\U00002018' was not declared in this scope
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                ^
a.cc:2:18: error: '\U0000201cNo\U0000201d' was not declared in this scope
    2 | #define no cout<<“No”;return 0;
      |                  ^~~~
a.cc:10:21: note: in expansion of macro 'no'
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                     ^~
a.cc:11:11: error: '\U000020180\U00002019' was not declared in this scope
   11 | else{if(c<‘0’||’9’<c){no;}}
      |           ^~~
a.cc:11:16: error: '\U000020199\U00002019' was not declared in this scope
   11 | else{if(c<‘0’||’9’<c){no;}}
      |                ^~~
a.cc:2:18: error: '\U0000201cNo\U0000201d' was not declared in this scope
    2 | #define no cout<<“No”;return 0;
      |                  ^~~~
a.cc:11:23: note: in expansion of macro 'no'
   11 | else{if(c<‘0’||’9’<c){no;}}
      |                       ^~
a.cc:13:7: error: '\U0000201cYes\U0000201d' was not declared in this scope
   13 | cout<<“Yes”;
      |       ^~~~~
Language: C++

#include<iostream>
#define no cout<<“No”;return 0;
using namespace std;
int main(){
int a,b;
cin>>a>>b;
for(int i=0;i<a+b+1;i++){
char c;
cin>>c;if(i==a){if(c!=‘-‘){no;}}
else{if (c<‘0’||’9’<c){no;}}
cout<<“Yes”;
}

Compiler output:
a.cc:2:18: error: extended character “ is not valid in an identifier
    2 | #define no cout<<“No”;return 0;
      |                  ^
a.cc:2:18: error: extended character ” is not valid in an identifier
a.cc:9:23: error: extended character ‘ is not valid in an identifier
    9 | cin>>c;if(i==a){if(c!=‘-‘){no;}}
      |                       ^
a.cc:9:25: error: extended character ‘ is not valid in an identifier
    9 | cin>>c;if(i==a){if(c!=‘-‘){no;}}
      |                         ^
a.cc:10:12: error: extended character ‘ is not valid in an identifier
   10 | else{if (c<‘0’||’9’<c){no;}}
      |            ^
a.cc:10:12: error: extended character ’ is not valid in an identifier
a.cc:10:17: error: extended character ’ is not valid in an identifier
   10 | else{if (c<‘0’||’9’<c){no;}}
      |                 ^
a.cc:10:17: error: extended character ’ is not valid in an identifier
a.cc:11:7: error: extended character “ is not valid in an identifier
   11 | cout<<“Yes”;
      |       ^
a.cc:11:7: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:9:23: error: '\U00002018' was not declared in this scope
    9 | cin>>c;if(i==a){if(c!=‘-‘){no;}}
      |                       ^
a.cc:2:18: error: '\U0000201cNo\U0000201d' was not declared in this scope
    2 | #define no cout<<“No”;return 0;
      |                  ^~~~
a.cc:9:28: note: in expansion of macro 'no'
    9 | cin>>c;if(i==a){if(c!=‘-‘){no;}}
      |                            ^~
a.cc:10:12: error: '\U000020180\U00002019' was not declared in this scope
   10 | else{if (c<‘0’||’9’<c){no;}}
      |            ^~~
a.cc:10:17: error: '\U000020199\U00002019' was not declared in this scope
   10 | else{if (c<‘0’||’9’<c){no;}}
      |                 ^~~
a.cc:2:18: error: '\U0000201cNo\U0000201d' was not declared in this scope
    2 | #define no cout<<“No”;return 0;
      |                  ^~~~
a.cc:10:24: note: in expansion of macro 'no'
   10 | else{if (c<‘0’||’9’<c){no;}}
      |                        ^~
a.cc:11:7: error: '\U0000201cYes\U0000201d' was not declared in this scope
   11 | cout<<“Yes”;
      |       ^~~~~
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
#define no cout<<“No”;return 0;
using namespace std;
int main(){
int a,b;
cin>>a>>b;
for(int i=0;i<a+b+1;i++){
char c;
cin>>c;if(i==a){if(c!=‘-‘){no;}}
else if (c<‘0’||’9’<c){no;}
}
cout<<“Yes”;
}

Compiler output:
a.cc:2:18: error: extended character “ is not valid in an identifier
    2 | #define no cout<<“No”;return 0;
      |                  ^
a.cc:2:18: error: extended character ” is not valid in an identifier
a.cc:9:23: error: extended character ‘ is not valid in an identifier
    9 | cin>>c;if(i==a){if(c!=‘-‘){no;}}
      |                       ^
a.cc:9:25: error: extended character ‘ is not valid in an identifier
    9 | cin>>c;if(i==a){if(c!=‘-‘){no;}}
      |                         ^
a.cc:10:12: error: extended character ‘ is not valid in an identifier
   10 | else if (c<‘0’||’9’<c){no;}
      |            ^
a.cc:10:12: error: extended character ’ is not valid in an identifier
a.cc:10:17: error: extended character ’ is not valid in an identifier
   10 | else if (c<‘0’||’9’<c){no;}
      |                 ^
a.cc:10:17: error: extended character ’ is not valid in an identifier
a.cc:12:7: error: extended character “ is not valid in an identifier
   12 | cout<<“Yes”;
      |       ^
a.cc:12:7: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:9:23: error: '\U00002018' was not declared in this scope
    9 | cin>>c;if(i==a){if(c!=‘-‘){no;}}
      |                       ^
a.cc:2:18: error: '\U0000201cNo\U0000201d' was not declared in this scope
    2 | #define no cout<<“No”;return 0;
      |                  ^~~~
a.cc:9:28: note: in expansion of macro 'no'
    9 | cin>>c;if(i==a){if(c!=‘-‘){no;}}
      |                            ^~
a.cc:10:12: error: '\U000020180\U00002019' was not declared in this scope
   10 | else if (c<‘0’||’9’<c){no;}
      |            ^~~
a.cc:10:17: error: '\U000020199\U00002019' was not declared in this scope
   10 | else if (c<‘0’||’9’<c){no;}
      |                 ^~~
a.cc:2:18: error: '\U0000201cNo\U0000201d' was not declared in this scope
    2 | #define no cout<<“No”;return 0;
      |                  ^~~~
a.cc:10:24: note: in expansion of macro 'no'
   10 | else if (c<‘0’||’9’<c){no;}
      |                        ^~
a.cc:12:7: error: '\U0000201cYes\U0000201d' was not declared in this scope
   12 | cout<<“Yes”;
      |       ^~~~~
Language: C++

#include<iostream>
#define no cout<<“No”;return 0;
using namespace std;
int main(){
int a,b;
cin>>a>>b;
for(int i=0;i<a+b+1;i++){
char c;
cin>>c;
if(i==a){if(c!=‘-‘){no;}}
else
if (c<‘0’||’9’<c){no;}
}
cout<<“Yes”;
}

Compiler output:
a.cc:2:18: error: extended character “ is not valid in an identifier
    2 | #define no cout<<“No”;return 0;
      |                  ^
a.cc:2:18: error: extended character ” is not valid in an identifier
a.cc:10:16: error: extended character ‘ is not valid in an identifier
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                ^
a.cc:10:18: error: extended character ‘ is not valid in an identifier
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                  ^
a.cc:12:7: error: extended character ‘ is not valid in an identifier
   12 | if (c<‘0’||’9’<c){no;}
      |       ^
a.cc:12:7: error: extended character ’ is not valid in an identifier
a.cc:12:12: error: extended character ’ is not valid in an identifier
   12 | if (c<‘0’||’9’<c){no;}
      |            ^
a.cc:12:12: error: extended character ’ is not valid in an identifier
a.cc:14:7: error: extended character “ is not valid in an identifier
   14 | cout<<“Yes”;
      |       ^
a.cc:14:7: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:10:16: error: '\U00002018' was not declared in this scope
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                ^
a.cc:2:18: error: '\U0000201cNo\U0000201d' was not declared in this scope
    2 | #define no cout<<“No”;return 0;
      |                  ^~~~
a.cc:10:21: note: in expansion of macro 'no'
   10 | if(i==a){if(c!=‘-‘){no;}}
      |                     ^~
a.cc:12:7: error: '\U000020180\U00002019' was not declared in this scope
   12 | if (c<‘0’||’9’<c){no;}
      |       ^~~
a.cc:12:12: error: '\U000020199\U00002019' was not declared in this scope
   12 | if (c<‘0’||’9’<c){no;}
      |            ^~~
a.cc:2:18: error: '\U0000201cNo\U0000201d' was not declared in this scope
    2 | #define no cout<<“No”;return 0;
      |                  ^~~~
a.cc:12:19: note: in expansion of macro 'no'
   12 | if (c<‘0’||’9’<c){no;}
      |                   ^~
a.cc:14:7: error: '\U0000201cYes\U0000201d' was not declared in this scope
   14 | cout<<“Yes”;
      |       ^~~~~
Language: C++

#include<cstdio>
int a,b;
char s[100];
int main()
{
	scanf("%d%d",&a,&b);
	scanf("%s",s);
	for(int i=0;i<a;i++)
	{
		if(!('0'<=s[i])&&(s[i]<='9'))
		{
		puts("No");
		return 0;
		}
	}
	if(s[a]!='-')
	{
		puts("No");
		return 0;
	}
	for(i=a+1;i<=a+b;i++)
	{
		if(!('0'<=s[i])&&(s[i]<='9'))
		{		
		puts("No");
		return 0;
		}

	}
	puts("Yes");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'i' was not declared in this scope
   21 |         for(i=a+1;i<=a+b;i++)
      |             ^
Language: C++

#include<stdio.h>
int a,b;
char s[100];
int main()
{
	scanf("%d%d",&a,&b);
	scanf("%s",s);
	for(int i=0;i<a;i++)
	{
		if(!('0'<=s[i])&&(s[i]<='9'))
		{
		puts("no");
		return 0;
		}
	}
	if(s[a]!='-')
	{
		puts("no");
		return 0;
	}
	for(i=a+1;i<=a+b;i++)
	{
		if(!('0'<=s[i])&&(s[i]<='9'))
		{		
		puts("no");
		return 0;
		}

	}
	puts("yes");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'i' was not declared in this scope
   21 |         for(i=a+1;i<=a+b;i++)
      |             ^
Language: C

#include<stdio.h>
int a,b,i;
int main()
{
	char s[100];
	scanf("%d%d",&a,&b);
	scanf("%s",s);
	if((1>a)&&(b>5))
	{
	puts("no");
	return 0;
	}
	for(i=0;i<a;i++)
	{
		if(!('0'<=s[i])||(s[i]<='9'))
		{
		puts("no");
		return 0;
		}
	}
	if(s[a]!='-')
	{
		puts("no");
		return 0;
	}
	for(i=a+1;i<=a+b;i++)
	{
		if(('0'<=s[j])||(s[j]<='9'))
		{		
		puts("no");
		return 0
		}

	}
	puts("yes");
}


Compiler output:
main.c: In function 'main':
main.c:28:28: error: 'j' undeclared (first use in this function)
   28 |                 if(('0'<=s[j])||(s[j]<='9'))
      |                            ^
main.c:28:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:25: error: expected ';' before '}' token
   31 |                 return 0
      |                         ^
      |                         ;
   32 |                 }
      |                 ~
Language: C

#include<stdio.h>
int a,b,i,j,flag;
int main()
{
	char s[a+b+1];
	scanf("%d%d",&a,&b);
	scanf("%s",s);
	if((1<=a)&&(b<=5))
	{
	flag=1:
	}
	for(i=0;i<a;i++)
	{
		if((0<=s[i])||(s[i]<=9))
		{
		flag=1;
		}
	}
	for(j=a+1;j<b;j++)
	{
		if((0<=s[j])||(s[j]<=9))
		{		
		flag=1;
		}
	}
	if(s[a]=='-')
	{
	flag=1;
	}
	if(flag==1)
	{
	puts("yes");
	}
	else
	{
	puts("no");
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:15: error: expected ';' before ':' token
   10 |         flag=1:
      |               ^
      |               ;
Language: C++

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

int main(void) {
    int a,b;
    cin >> a >> b;
    string s;
    cin >> s;
    for (int i = 0; i < s.size; i++) {
        if (s[i] == '-') {
            if (i == a+1) continue;
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |     for (int i = 0; i < s.size; i++) {
      |                         ~~^~~~
      |                               ()
Language: C++

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

int main(){

  int a;
  int b;
  string s;
  bool check = true;

  cin >> a >> b >> s;

  for(int i = 0;i < s.size();i++){
    if(i == a){
      // if(s[i+1] == '-'){
        if(s[i] == '-'){
        check = true;
        }
    }else if(s[i] >= '0' && s[i] <= '9'){
        check = true;
      }
    }

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


Compiler output:
a.cc:30:5: error: expected unqualified-id before 'return'
   30 |     return 0;
      |     ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

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

 int main(){

   int a;
   int b;
   string s;
   bool check = true;

   cin >> a >> b >> s;

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

     if(i == a){
            if(s[i] != '-'){
         check = false;
       }

       if(s[i] > '0' && s[i] < '9'){
         check = false;
       }

     }
   }

     if(check == true){
       cout << "YES" << endl;
     }else{
       cout << "NO" << endl;
     }
     return 0;
   }
 }


Compiler output:
a.cc:34:2: error: expected declaration before '}' token
   34 |  }
      |  ^
Language: C++

 #include <bits/stdc++.h>
  using namespace std;
  
 int main(){
  
   int a;
   int b;
   string s;
   bool check = true;
  
   cin >> a >> b >> s;
  
   for(int i = 0;i < s.size();i++){
     if(i == a){
            if(s[i] != '-'){
         check = false;
       }else if(s[i] <= '0' && s[i] >= '9'){
         check = false;
       }
     }
  
     if(check == true){
       cout << "YES" << endl;
     }else{
       cout << "NO" << endl;
     }
     return 0;
   }
 }

Compiler output:
a.cc:3:2: error: extended character   is not valid in an identifier
    3 |   
      |  ^
a.cc:5:2: error: extended character   is not valid in an identifier
    5 |   
      |  ^
a.cc:10:2: error: extended character   is not valid in an identifier
   10 |   
      |  ^
a.cc:12:2: error: extended character   is not valid in an identifier
   12 |   
      |  ^
a.cc:21:2: error: extended character   is not valid in an identifier
   21 |   
      |  ^
a.cc:3:2: error: '\U000000a0' does not name a type
    3 |   
      |  ^
Language: C++

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

int main(){

  int a;
  int b;
  string s;
  bool check = true;

  cin >> a >> b >> s;

  for(int i = 0;i < s.size();i++){
    if(i == a){
      // if(s[i+1] == '-'){
        if(s[i] == '-'){
        check = true;
      }else if(s[i] >= "0" && s[i] <= "9"){
        check = true;
      }
    }

    if(check == true){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }

    return 0;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       }else if(s[i] >= "0" && s[i] <= "9"){
a.cc:18:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       }else if(s[i] >= "0" && s[i] <= "9"){
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a, b; cin >> a >> b;
  string s; cin >> s;
  if(s.length() != a + b + 1) cout << "No" << endl;
  else {
    FOR(i,0,s.length()) {
      if(i == a) {
        if(s[i] != '-') cout << "No" << endl;
      } else {
        if(s[i] >= '0' && s[i] <= '9') continue;
      }
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
  
}

Compiler output:
a.cc:43:1: error: expected declaration before '}' token
   43 | }
      | ^
Language: Java

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
  public static void main (String[] args) {
    
   int a,b;
   String str;

   Scanner sc = new Scanner (System.in);
   a=sc.nextInt();
   b=sc.nextInt();
   str=sc.next();    

   Pattern p = Pattern.compile("^[0-9]{"+a+"}-[0-9]{"+b+"}");
   Matcher m = p.matcher(str);
   if (m.find()) {
	System.out.println(Yes);
   } else {
 	System.out.println("No");
   }

  }
}

Compiler output:
Main.java:19: error: cannot find symbol
	System.out.println(Yes);
	                   ^
  symbol:   variable Yes
  location: class Main
1 error
Language: C++

#include<iostream>
#include<string>
#include<ctype.h>
using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    string s;
    cin >> s;
    int flag = 1;
    if(s[a]!='-') {flag=0; break;}
    else {
    for (int i=0; i<b; i++) {
        if(i!=a && !isdigit(s[i])) {
            flag=0; break;
        }
    }
    }
    
    cout << (flag ? "Yes" : "No") << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: break statement not within loop or switch
   12 |     if(s[a]!='-') {flag=0; break;}
      |                            ^~~~~
Language: Java

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class NewYear2 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String postCode = sc.next();
		Pattern p = Pattern.compile("^[0-9]{" + a + "}-[0-9]{" + b + "}");
		Matcher m = p.matcher(postCode);
		if(m.find()){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
}


Compiler output:
Main.java:5: error: class NewYear2 is public, should be declared in a file named NewYear2.java
public class NewYear2 {
       ^
1 error
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    string s;
    cin >> s;
    int flag = 1;
    if(s[a]=='-') {
        for(int i=0; i<a; i++) {
            if(s[i]>='1' && s[i]<='9') { ;; }
            else { flag=0; break;}
        }
        if(!flag) {
            for(int i=a; i<b; i++) {
                if(s[i]>='1' && s[i]<='9') { ;; }
                else { flag=0; break;}
            }
        }
    }
    else { flag = 0; }
    if(flag==0) { cout << "No" << endl;}
    else { cout << "Yes" << endl;}
    return 0;
}
#include<iostream>
#include<string>
using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    string s;
    cin >> s;
    int flag = 1;
    if(s[a]=='-') {
        for(int i=0; i<a; i++) {
            if(s[i]>='1' && s[i]<='9') { ;; }
            else { flag=0; break;}
        }
        if(!flag) {
            for(int i=a; i<b; i++) {
                if(s[i]>='0' && s[i]<='9') { ;; }
                else { flag=0; break;}
            }
        }
    }
    else { flag = 0; }
    if(flag==0) { cout << "No" << endl;}
    else { cout << "Yes" << endl;}
    return 0;
}
Submission
問題

Compiler output:
a.cc:31:5: error: redefinition of 'int main()'
   31 | int main()
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main()
      |     ^~~~
a.cc:55:1: error: 'Submission' does not name a type
   55 | Submission
      | ^~~~~~~~~~
Language: C++

#include<iostream.h>
#include<string.h>
using namespace std;
int main(void)
{
	int a,b,s;
	string str;
	
	cin>>a>>b;
	cin>>str;
	
	if( (a>0&&a<5) && (b>0&&b<5) )
	{
		if( (str.size()) == (a+b+1) )
		{
			if((str.find("-")+1)== a+1 )
			{
				for(int i=0;i<a+b+1;i++){
					if((str[i]<'0') || (str[i]>'9')) s--;
					s++;
				}
					
				if(s==(a+b)) {
					cout<<"Yes";
				}else cout<<"No";
			}else cout<<"No";
			
		}else cout<<"No";
	
	}else cout<<"No";
	
	return 0;
	
}


Compiler output:
a.cc:1:9: fatal error: iostream.h: No such file or directory
    1 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream.h>
#include<string.h>
using namespace std;
int main(void)
{
	unsigned int a,b,s;
	string str;
	
	cin>>a>>b;
	cin>>str;
	
	if( (a>0&&a<5) && (b>0&&b<5) )
	{
		if( (str.size()) == (a+b+1) )
		{
			if((str.find("-")+1)== a+1 )
			{
				for(unsigned int i=0;i<a+b+1;i++){
					if((str[i]<'0') || (str[i]>'9')) s--;
					s++;
				}
					
				if(s==(a+b)) {
					cout<<"Yes";
				}else cout<<"No";
			}else cout<<"No";
			
		}else cout<<"No";
	
	}else cout<<"No";
	
	return 0;
	
}


Compiler output:
a.cc:1:9: fatal error: iostream.h: No such file or directory
    1 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
char c[111];
int a, b;
int main(){
    scanf("%d %d\n", &a, &b);
    scanf("%s",c);
    for(int i=0; i<a; i++){
    	if ('0' <= c[i] && c[i] <= '9')
    			;
    		else
    			return puts("No");
    }
    if (c[i]!='-')
    	return puts("No");
	
	for(int i=a+1; i<a+b+1; i++){
    	if ('0' <= c[i] && c[i] <= '9')
    			;
    		else
    			return puts("No");
    }
    puts("Yes");
 
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: 'i' was not declared in this scope
   15 |     if (c[i]!='-')
      |           ^
Language: C

#include <cstdio>
int main()
{
  int A, B;
  char S[256];
  scanf("%d", &A);
  while(A < 1 || A > 5)
      scanf("%d", &A);
  scanf("%d", &B);
  while(B < 1 || B > 5)
      scanf("%d", &B);
  scanf("%s", S);
  for(int i = 0; i < A + B; i++){
    if(S[A] != '-' || S[i] == '-'){
      printf("No");
      break;
    }
    else{
      printf("Yes");
      break;
    }
  }
  printf("\n");
  return 0;
}

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

#include <iostream>
using namespace std;

int main(){
  int A,B,lp,Ar= 0;
  char S[11];
  int flag = 0;

  cin >> A >> B;

  cin >> S[];

  lp = 0;
  while (lp < A+B+1){
    if (S[lp] = '0'or'1'or'2'or'3'or'4'or'5'or'6'or'7'or'8'or'9'){
      if (flag == 0){
        Ar++;
      }
    }else{
      if (lp == A+1 and S[lp] == '-'){
        flag++;
      }
    }
    lp ++;
  }

  //処理
  if (Ar == A){
    cout << "Yes"<<endl;
  }else{
    cout << "No"<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected primary-expression before ']' token
   11 |   cin >> S[];
      |            ^
a.cc:15:17: error: unable to find character literal operator 'operator""or' with 'char' argument
   15 |     if (S[lp] = '0'or'1'or'2'or'3'or'4'or'5'or'6'or'7'or'8'or'9'){
      |                 ^~~~~
a.cc:15:22: error: expected ')' before user-defined character literal
   15 |     if (S[lp] = '0'or'1'or'2'or'3'or'4'or'5'or'6'or'7'or'8'or'9'){
      |        ~             ^~~~~
      |                      )
a.cc:32:4: error: expected '}' at end of input
   32 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include <stdio.h>
int main(){
  int a,b,c,d,e,f;
  char ch,ch2;
  c =scanf("%d%d",&a,&b);
  d = scanf("%d%c%d",&e,&ch,&f);
 int count1,count2;
 for(int i =0;i<a;i++){
   e =e/10;
   count1 += 1;
 }
 for(int i =0;i<b;i++){
   f =f/10;
   count2 += 1;
 }

   if(d!=3) {
      printf("No");
    }
else{
  
  if(a ==count1 &&b ==count2){
    printf("Yes");
  }else{
    printf("No");
  }
}
   printf("%c,%d",ch2,aa);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:28:23: error: 'aa' undeclared (first use in this function); did you mean 'a'?
   28 |    printf("%c,%d",ch2,aa);
      |                       ^~
      |                       a
main.c:28:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include <stdio.h>
int main(void)
{
  int A, B;
  char S[256];
  scanf("%d", &A);
  while(A < 1 || A > 5)
      scanf("%d", &A);
  scanf("%d", &B);
  while(B < 1 || B > 5)
      scanf("%d", &B);
  scanf("%s", S);
  for(int i = 0; i < A + B; i++){
    if(S[A] != '-' || S[i] == '-'){
      printf("NO");
      break;
    }
    else{
      printf("YES");
      break;
    }
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C++

#include<iostream.h>
#include<string.h>
using namespace std;
int main(void)
{
	unsigned int a,b;
	int s;
	string str;
	
	cin>>a>>b;
	cin>>str;
	
	if( (a>0&&a<5) && (b>0&&b<5) )
	{
		if( (str.size()) == (a+b+1) )
		{
			if((str.find("-")+1)== a+1 )
			{
				for(unsigned int i=0;i<a+b+1;i++){
					if((str[i]<'0') || (str[i]>'9')) s--;
				}
					s++;
				if(s==(a+b)) {
					cout<<"Yes";
				}else cout<<"No";
			}else cout<<"No";
			
		}else cout<<"No";
	
	}else cout<<"No";
	
	return 0;
	
}

Compiler output:
a.cc:1:9: fatal error: iostream.h: No such file or directory
    1 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C

clude <stdio.h>
int main(void)
{
  int A, B;
  char S[256];
  scanf("%d", &A);
  while(A < 1 || A > 5)
      scanf("%d", &A);
  scanf("%d", &B);
  while(B < 1 || B > 5)
      scanf("%d", &B);
  scanf("%s", S);
  for(int i = 0; i < A + B; i++){
    if(S[A] != '-' || S[i] == '-'){
      printf("NO");
      break;
    }
    else{
      printf("YES");
      break;
    }
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c:1:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | clude <stdio.h>
      |       ^
Language: C++

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
int main()
{
    int a,b;
    char arr[15];
    scanf("%d %d ",&a,&b);
    gets(arr);
    bool ans=false;
    int siz=strlen(arr);
    if(arr[a]==45)
    {
        for(int i=a+1;i<siz;i++)
        {
            if(arr[i]>='0'&&arr[i]<='9')
            {
                ans=true;
            }
            else
            {
                ans=false;
                break;
            }
        }
    }
    if(ans)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |     gets(arr);
      |     ^~~~
      |     getw
Language: C++

#include <cstdio>
int main(){
  int A, B;
  scanf("%d %d", &A, &B);
  char S;
  int i, ans=1;
  for(i=0; i<=A+B; i++){
    scanf("%c", &S);
    if(i!=A){
        if(S[i]<'0' && '9'<S[i]){
            ans = 0;
            break;
        }
    }else{
        if(S[i]!='-'){
            ans =0;
            break;
        }
    }
  }
  if(ans)printf("Yes\n");
  else printf("No\n");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid types 'char[int]' for array subscript
   10 |         if(S[i]<'0' && '9'<S[i]){
      |             ^
a.cc:10:29: error: invalid types 'char[int]' for array subscript
   10 |         if(S[i]<'0' && '9'<S[i]){
      |                             ^
a.cc:15:13: error: invalid types 'char[int]' for array subscript
   15 |         if(S[i]!='-'){
      |             ^
Language: C++

#include<stdio.h>

int main(){
	int a,b,i;
	char s[];
	scanf("%d%d"&a,&b);
	scanf("%s",s);
	for(i=0;i<a;i++){
		if(s[i]!='0' || s[i]!='1' || s[i]!='2' || s[i]!='3' || s[i]!='4' || s[i]!='5' || s[i]!='6' || s[i]!='7' || s[i]!='8' || s[i]!='9'){
			printf("No/n");
			return 0;
		}
	}
	if(s[i]!='-'){
		printf("No/n");
			return 0;
	}
	for(i=1;i<=b;i++){
		if(s[a+i]!='0' || s[a+i]!='1' || s[a+i]!='2' || s[a+i]!='3' || s[a+i]!='4' || s[a+i]!='5' || s[a+i]!='6' || s[a+i]!='7' || s[a+i]!='8' || s[a+i]!='9'){
			printf("No/n");
			return 0;
		}
	}
	if(s[a+b+1]!='\0'){
		printf("No/n");
			return 0;
	}
	printf("Yes\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: storage size of 's' isn't known
    5 |         char s[];
      |              ^
a.cc:6:21: error: invalid operands of types 'const char [5]' and 'int' to binary 'operator&'
    6 |         scanf("%d%d"&a,&b);
      |               ~~~~~~^~
      |               |      |
      |               |      int
      |               const char [5]
Language: C++

#include<stdio.h>
int main(void)
{
int box[A+B+1]
int A,B,S,count;
scanf("%d",&A);
scanf("%d",&B);
scanf("%d",&S);
box[ ]=S;
count=sizeof box/sizeof(int);
if(1<=A && B<=5 && box[A+1]='-' && count==A+B+1){
printf("yes");}
else{
printf("no");}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'A' was not declared in this scope
    4 | int box[A+B+1]
      |         ^
a.cc:4:11: error: 'B' was not declared in this scope
    4 | int box[A+B+1]
      |           ^
a.cc:5:1: error: expected initializer before 'int'
    5 | int A,B,S,count;
      | ^~~
a.cc:8:13: error: 'S' was not declared in this scope
    8 | scanf("%d",&S);
      |             ^
a.cc:9:1: error: 'box' was not declared in this scope
    9 | box[ ]=S;
      | ^~~
a.cc:9:6: error: expected primary-expression before ']' token
    9 | box[ ]=S;
      |      ^
a.cc:10:1: error: 'count' was not declared in this scope
   10 | count=sizeof box/sizeof(int);
      | ^~~~~
Language: C

#include<iostream>
#include<string.h>
using namespace std;
int a,b,i;
char str[100000];
int main(){
	while(scanf("%d%d",&a,&b)!=EOF){
		cin>>str;
		while(str[i]!='-'){
			i++;
		}
		if((strlen(str)==a+b+1)&&i==a){
		cout<<"Yes"<<endl;
	}else{
		cout<<"No"<<endl;
	}
	i=0;
	memset(str,0,strlen(str));
}
	return 0;
}

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

#incclude<stdio.h>

int main(){
	int a,b,i;
	char s[];
	scanf("%d%d"&a,&b);
	scanf("%s",s);
	for(i=0;i<a;i++){
		if(s[i]!='0' || s[i]!='1' || s[i]!='2' || s[i]!='3' || s[i]!='4' || s[i]!='5' || s[i]!='6' || s[i]!='7' || s[i]!='8' || s[i]!='9'){
			printf("No/n");
			return 0;
		}
	}
	if(s[i]!='-'){
		printf("No/n");
			return 0;
	}
	for(i=1;i<=b;i++){
		if(s[a+i]!='0' || s[a+i]!='1' || s[a+i]!='2' || s[a+i]!='3' || s[a+i]!='4' || s[a+i]!='5' || s[a+i]!='6' || s[a+i]!='7' || s[a+i]!='8' || s[a+i]!='9'){
			printf("No/n");
			return 0;
		}
	}
	if(s[a+b+1]!='\0'){
		printf("No/n");
			return 0;
	}
	printf("Yes\n");
	return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incclude; did you mean #include?
    1 | #incclude<stdio.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:14: error: storage size of 's' isn't known
    5 |         char s[];
      |              ^
a.cc:6:21: error: invalid operands of types 'const char [5]' and 'int' to binary 'operator&'
    6 |         scanf("%d%d"&a,&b);
      |               ~~~~~~^~
      |               |      |
      |               |      int
      |               const char [5]
a.cc:6:9: error: 'scanf' was not declared in this scope
    6 |         scanf("%d%d"&a,&b);
      |         ^~~~~
a.cc:10:25: error: 'printf' was not declared in this scope
   10 |                         printf("No/n");
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #incclude<stdio.h>
a.cc:15:17: error: 'printf' was not declared in this scope
   15 |                 printf("No/n");
      |                 ^~~~~~
a.cc:15:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:25: error: 'printf' was not declared in this scope
   20 |                         printf("No/n");
      |                         ^~~~~~
a.cc:20:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:25:17: error: 'printf' was not declared in this scope
   25 |                 printf("No/n");
      |                 ^~~~~~
a.cc:25:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:28:9: error: 'printf' was not declared in this scope
   28 |         printf("Yes\n");
      |         ^~~~~~
a.cc:28:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
using namespace std;

int main(){
  int A,B,lp,Ar= 0,Br = 0;
  char S[11];
  int flag = 0;

  cin >> A >> B;
  cin >> S;

  lp = 0;
  while (lp < 12){
    if (S[lp] == '0' or '1' or'2' or '3' or '4' or '5' or '6' or '7' or '8' or '9'){
      if (flag == 0){
        Ar ++;
      }else{
        Br ++;
      }
    }else{
      if (S[lp] == '-'){
        flag ++;
    }

    lp++;
  }
  if (S[A+1] == "-" and Br == B and Ar == A){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |   if (S[A+1] == "-" and Br == B and Ar == A){
      |       ~~~~~~~^~~~~~
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^