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

#include<iostream>
#include <stdio.h>
#include<string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <cstdint>
#include <queue> 
#include <map>
#include <set>
#define MOD 1000000007
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n)  FOR(i,0,n)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
typedef long long ll;
using namespace std;

int main(){

  int a,b;
  cin >> a >> b;
  
  string s;
  cin >> s;

  REP(i,a+b+1){
    if(i == a && s[i] != '-'){
      cout << "No" << endl; return 0;
    }
    else if(s[i] < '0' || s[i] > '9'){
      cout << "No" << endl; return 0;
    }
    
    cout << "Yes" << endl;
  
 return 0;
}

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

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

int main(void) {
  int a, b;
  string str;
  cin >> a >> b;
  bool flag = true;
  cin >> str;
  for (int i = 0; i < str.length(); i++) {
    if (i != a) {
      if ((int)(str[i] - '0') < 10 && (int)(str[i] - '0' >= 0)) {
        flag = true;
      } else {
        flag = false;
      }
    }
  }
  if (str[a] == '-') {

  } else {
    flag = false;
  }
  if (str.length() > a + b + 1) {
    falg = false;
  }
  if (flag) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:5: error: 'falg' was not declared in this scope; did you mean 'flag'?
   27 |     falg = false;
      |     ^~~~
      |     flag
Language: C++

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

int main() {
  int A, B, S;
  cin >> A, B, S;
  
  if (A + B + 1 = S){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |   if (A + B + 1 = S){
      |       ~~~~~~^~~
Language: C++

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

int amin() {
  int A, B, S;
  cin >> A, B, S;
  
  if (A + B + 1 = S){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int amin()':
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |   if (A + B + 1 = S){
      |       ~~~~~~^~~
a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include<cstdio>
#include<bits/stdc++.h>
using namespace std;
using ll =long long;

int main (void) {
  int A,B;
  char s;
  cin>> A>> B;
  for (int i=0;i<A+B+1;i++){
    cin >> s;
    if (i==A){
      if(s=="-"){
        continue;
      }
      else {
        cout << "No";
        return 0;
      }
    }
    if (s=="-"){
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if(s=="-"){
      |          ~^~~~~
a.cc:26:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |     if (s=="-"){
      |         ~^~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include<cstdio>
#include<bits/stdc++.h>
using namespace std;
using ll =long long;

int main (void) {
  int A,B;
  string S;
  cin >> A>>B;
  cin>>S;
  if(S[A+1] !="-" || S.size()==A+B+1){
    cout << "No";
    break;
  }
  else{
    cout << "Yes"
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |   if(S[A+1] !="-" || S.size()==A+B+1){
a.cc:18:5: error: break statement not within loop or switch
   18 |     break;
      |     ^~~~~
a.cc:21:18: error: expected ';' before '}' token
   21 |     cout << "Yes"
      |                  ^
      |                  ;
   22 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define LL long long
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define LL_MIN -9223372036854775808
#define LL_MAX 9223372036854775807
#define segment_size 65536
int main(){
    int A,B;
    cin >> A >> B;
    string S;
    cin >> S;
    flg = true;
    for(int i=0; i<A; i++){
        if(S[i] == '-') flg = false;
    }
    if(S[A] != '-') flg = false;
    for(int i=A+1; i<B; i++){
        if(S[i] == '-') flg = false;
    }
    if(flg) cout << "Yes" << endl;
    else cout << "No" << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'flg' was not declared in this scope
   16 |     flg = true;
      |     ^~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
bool in(char s){
  if(s=='1' || s=='2' || s=='3' || s=='4' || s=='5' || s=='6' || s=='7' || s=='8' || s=='9' || s=='0')
    return true;
}
int main(){
  int a,b;
  string s;
  cin >> a >> b >> s;
  for(int i=0;i<a+b+1;i++)
    if(i!=a){
      if(in(s[i]!=true){
         cout << "No" << endl;
         return 0;
      }
    }
    else
      if(s[i]!='-'){
         cout << "No" << endl;
         return 0;
      }
   cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected ')' before '{' token
   14 |       if(in(s[i]!=true){
      |         ~              ^
      |                        )
a.cc:18:5: error: expected primary-expression before '}' token
   18 |     }
      |     ^
a.cc: In function 'bool in(char)':
a.cc:7:1: warning: control reaches end of non-void function [-Wreturn-type]
    7 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
bool in(char s){
  if(s=='1' || s=='2' || s=='3' || s=='4' || s=='5' || s=='6' || s=='7' || s=='8' || s=='9' || s=='0')
    return true;
}
int main(){
  int a,b;
  string s;
  cin >> a >> b >> s;
  for(int i=0;i<a+b+1;i++)
    if(i!=a){
      if(!in(s[i]){
         cout << "No" << endl;
         return 0;
      }
    }
    else
      if(s[i]!='-'){
         cout << "No" << endl;
         return 0;
      }
   cout << "yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected ')' before '{' token
   14 |       if(!in(s[i]){
      |         ~         ^
      |                   )
a.cc:18:5: error: expected primary-expression before '}' token
   18 |     }
      |     ^
a.cc: In function 'bool in(char)':
a.cc:7:1: warning: control reaches end of non-void function [-Wreturn-type]
    7 | }
      | ^
Language: C++

#include <stdio.h>

int main(void)
{
    int i, a, b, flag=1;
    char s[12];

    scanf("%d%d", &a, &b);
    scanf("%s", s);

    if (s[a]!='-') {
        printf("No\n");
        return 0;
    }

    for (i=0; i<a+b+1; i++) {
        if (i==a) continue;

        if (!isdigit(s[i])) {
            flag = 0;
            break;
        }
    }

    if (flag==1)    printf("Yes\n");
    else            printf("No\n");

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: 'isdigit' was not declared in this scope
   19 |         if (!isdigit(s[i])) {
      |              ^~~~~~~
Language: C++

#include <iostream>
#include<string>
using namespace std;
int main(void){
    int A,B;
    string S;
    bool can = false;
    
    cin>>A>>B>>S;
    
    if(S[A] == '-' ){
        for(int i=0; i<A;i++){
            for(int j=0;j<=9;j++){
                if(S[i] - '0' == j) can = true;
            }
        }
        if(!can) continue;
        can=false;
        for(int i=A; i<S.size();i++){
            for(int j=0;j<=9;j++){
                if(S[i] - '0' == j) can = true;
            }
        }
    }
    
    else can = false;
    
    if(can) cout<<"Yes\n";
    else cout<<"No\n";
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: continue statement not within a loop
   17 |         if(!can) continue;
      |                  ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,n;
  string h;
  cin>>a>>b>>h;
  
  for(int i=0;i<h.size();i++){
    if(s[i]=='-'){
      ++n;
    }
  }
  
  if(n==1&&h.at[a]=='-'){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 's' was not declared in this scope
    9 |     if(s[i]=='-'){
      |        ^
a.cc:14:16: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   14 |   if(n==1&&h.at[a]=='-'){
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  char a[20];
  int A,B;
  cin >>A>>B;
  int(int i = 0;i < A+B+1;i++){
    cin >> char a[i];
  }
  if(char a[A+1] == '-' && a[A-1] != '-' && a[B-1] != '-') cout <<"Yes"<<endl;
  else cout <<"No"<<endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected primary-expression before 'int'
    7 |   int(int i = 0;i < A+B+1;i++){
      |   ^~~
a.cc:7:17: error: 'i' was not declared in this scope
    7 |   int(int i = 0;i < A+B+1;i++){
      |                 ^
a.cc:10:11: error: condition declares an array
   10 |   if(char a[A+1] == '-' && a[A-1] != '-' && a[B-1] != '-') cout <<"Yes"<<endl;
      |           ^
Language: Java

import java.util.Scanner;
 
class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	int a = scan.nextInt();
	int b = scan.nextInt();
	String s = scan.next();
	if(s.length() != a+b+1){
	    System.out.println("No");
	    return;
	}
	for(int i = 0; i < a; i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		    System.out.println("No");
		    return;
	    }
	}
	if(s.charAt(a) != '-'){
	    System.out.println("No");
	    return;
	}
	for(int i = a+1; i < s.length(); i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		    System.out.println("No");
		    return;
	    }
	}
	    System.out.println("Yes");
    }
}
import java.util.Scanner;
 
class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	int a = scan.nextInt();
	int b = scan.nextInt();
	String s = scan.next();
	if(s.length() != a+b+1){
	    System.out.println("No");
	    return;
	}
	for(int i = 0; i < a; i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		    System.out.println("No");
		    return;
	    }
	}
	if(s.charAt(a) != '-'){
	    System.out.println("No");
	    return;
	}
	for(int i = a+1; i < s.length(); i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		    System.out.println("No");
		    return;
	    }
	}
	    System.out.println("Yes");
    }
}


Compiler output:
Main.java:34: error: class, interface, enum, or record expected
import java.util.Scanner;
^
1 error
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
    int a,b,i,l,flag=1;
    char s[20];
    scanf("%d %d",&a,&b);
    getchar();
    gets(s);
    l=strlen(s);
    if((a+b+1)!=l)
        printf("No\n");
    else
    {
        for(i=0;i<l;i++)
        {
            if(i!=a)
            {
                if(s[i]<'0'||s[i]>'9')
                {
                    flag=0;
                    break;
                }
            }
            else
            {
                if(s[i]!='-')
                {
                        flag=0;
                }

            }
        }
        if(flag==1)
            printf("Yes\n");
        else
            printf("No\n");
    }
    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(s);
      |     ^~~~
      |     getw
Language: C

import java.util.Scanner;
import java.io.*;

public class Main {
public static void main(String args[]) {
Scanner cro=new Scanner(System.in);
BufferedReader c=new BufferedReader(new InputStreamReader(System.in));
String s,s1;
int A,B,i,C;
C=0;
A=cro.nextInt();
B=cro.nextInt();
s1=cro.nextLine();
s=cro.nextLine();
for(i=0;i<A;i++) if(Character.isDigit(s.charAt(i))) C++;
if(s.charAt(A)=='-') C++;
for(i=A+1;i<A+B+1;i++) if(Character.isDigit(s.charAt(i))) C++;
if(C==A+B+1) System.out.println("Yes");
else System.out.println("No");
}   
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.*;
      |            ^
main.c:4:1: error: unknown type name 'public'
    4 | public class Main {
      | ^~~~~~
main.c:4:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    4 | public class Main {
      |              ^~~~
Language: Java

import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
  int a = sc.nextInt();
  int b = sc.nextInt();
  String s = sc.next();
  String[] t = s.split("-");
  if(t.length != 2)System.out.println("No");
  else if(t.length == 2 && s.charAt(a) == '-')System.out.println("Yes");
  else System.println("No")
}}

Compiler output:
Main.java:11: error: ';' expected
  else System.println("No")
                           ^
1 error
Language: Java

import java.util.Scanner;
import java.util.Arrays;
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        
        int A=sc.nextInt();
        int B=sc.nextInt();
        String S=sc.next();
        
        String ans="Yes";
        
        for(int i=0;i<A;i++){
            if(S.substring(0,1).equals("-")){
                ans="No";
            }
            S=S.substring(1);
        }
        if(!S.substring(0,1).equals("-")){
                ans="No";
            }
            S=S.substring(1);
        for(int i=0;i<B;i++){
            if(S.substring(0,1).equals("-")){
                ans="No";
            }
            S=S.substring(1);
        }
        
        System.out.println(ans);
    }

Compiler output:
Main.java:31: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

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


int main(){
	int A, B;
	cin >> A >> B;
	char S[A+B+1];
	cin >> S;
	for(int i=0; i<A){
		if(S[i]=='-'){
			cout << "Yes";
			return 0;
		}
	}
	if(S[A]!='-'){
		cout << "No";
		return 0;
	}
	for(int i=A+1; i<A+B+1; i++){
		if(S[i]=='-'){
			cout << "No";
			return 0;
		}
	}
	cout << "Yes" ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: expected ';' before ')' token
   11 |         for(int i=0; i<A){
      |                         ^
      |                         ;
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;

int main(){
    int A, B;
    char S[20];
    cin >> A >> B >> S;
    for(int i = 0; i < A; i++) if(!('0' <= S[i] && S[i] <= '9')){
        cout << "No" << endl;
        retun 0;
    }
    if(S[A] != '-'){
        cout << "No" << endl;
        return 0;
    }
    for(int i = A + 1; i < A + B + 1; i++) if(!('0' <= S[i] && S[i] <= '9')){
        cout << "No" << endl;
        retunr 0;
    }
    cout << "Yes" << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'retun' was not declared in this scope
   12 |         retun 0;
      |         ^~~~~
a.cc:20:9: error: 'retunr' was not declared in this scope
   20 |         retunr 0;
      |         ^~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
 
int main(){
  char s[11];
  int len, i, flag;
  scanf("%d%d", &A, &B);
  scanf(" %s", s);
  len = strlen(s);
  
  flag=1;

  if(len!=A+B+1)flag=0;

  for(i=0; i<len; i++){
    if(i==A){
      if(s[i]!='-')flag=0;
    }else{
      if(s[i]>'9' || s[i]<'0')flag=0;
    }
  }

  if(flag)
    printf("Yes\n");
  else
    printf("No\n");

}


Compiler output:
main.c: In function 'main':
main.c:7:18: error: 'A' undeclared (first use in this function)
    7 |   scanf("%d%d", &A, &B);
      |                  ^
main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:22: error: 'B' undeclared (first use in this function)
    7 |   scanf("%d%d", &A, &B);
      |                      ^
main.c:9:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    9 |   len = strlen(s);
      |         ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strlen'
    2 | #include<stdlib.h>
  +++ |+#include <string.h>
    3 | 
main.c:9:9: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    9 |   len = strlen(s);
      |         ^~~~~~
main.c:9:9: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    char rem[a+1];
    char ram[b+1];
    scanf("%s%s",rem,ram);
    int yes=1;
    if (ram[0]!='-')yes=0;
    if (yes==1)
    {
        for (int i=0;i<a;i++)
        {
            if (rem[i]<'0'||rem[i]>'9')
            {
                yes=0;
                break;
            }
        }
        if (yes==0)break;
        for (int i=1;i<b;i++)
        {
            if (ram[i]<'0'||rem[i]>'9')
            {
                yes=0;
                break;
            }
        }
    }
    if (yes==0)printf ("No\n");
    else printf ("Yes\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: break statement not within loop or switch
   24 |         if (yes==0)break;
      |                    ^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
    int A, B;
    cin >> A >> B;
    string S;
    cin >> S;

    bool ans = true;
    for(int i=0; i<=A+B; i++){
    if(A==i){
        if(S[i]!='-'){
            ans = false;
            break;
        }
    }else{
        if(S[i]<'0' || '9'<S[i]){
            ans = false;
            break;
        }
    }

    if(ans) cout << "Yes\n";
    else cout << "No\n";
    return 0;
}


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

#include <iostream>
#include <string>
int main(){
    int A, B;
    cin >> A >> B;
    string S;
    cin >> S;

    bool ans = true;
    for(int i=0; i<=A+B; i++){
    if(A==i){
        if(S[i]!='-'){
            ans = false;
            break;
        }
    }else{
        if(S[i]<'0' || '9'<S[i]){
            ans = false;
            break;
        }
    }

    if(ans) cout << "Yes\n";
    else cout << "No\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> A >> B;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     string S;
      |     ^~~~~~
a.cc:6:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:12: error: 'S' was not declared in this scope
    7 |     cin >> S;
      |            ^
a.cc:23:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |     if(ans) cout << "Yes\n";
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |     else cout << "No\n";
      |          ^~~~
      |          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: unable to find character literal operator 'operator""and' with 'char' argument
   14 |        if(!(s[i]>='0'and s[i]<= '9' and s[i]=='-'))
      |                   ^~~~~~
a.cc:14:25: error: expected ')' before 's'
   14 |        if(!(s[i]>='0'and s[i]<= '9' and s[i]=='-'))
      |            ~            ^~
      |                         )
a.cc:15:26: error: expected ')' before '}' token
   15 |         { f = 1; break; }
      |                          ^
      |                          )
   16 |    }
      |    ~                      
a.cc:14:10: note: to match this '('
   14 |        if(!(s[i]>='0'and s[i]<= '9' and s[i]=='-'))
      |          ^
a.cc:16:4: error: expected primary-expression before '}' token
   16 |    }
      |    ^
Language: C++

#include <iostream>
#include<string>
#include <cmath> 
using namespace std;   
int main()  
{ 
    int a,b;
    cin>>a>>b;
    string s;
    cin>>s;
    if(s.size()!=(a+b+1)){cout<<"NO"<<endl;system("pause");return 0;}
    else if(s[a]!='-'){cout<<"NO"<<endl;system("pause");return 0;}
    else
    s[a]=5;
    for(int i=0;i<s.size();i++){
    if(s[i]<'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
    cout<<"YES"<<endl;
    system("pause");
    return 0;
}

Compiler output:
a.cc:16:13: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   16 |     if(s[i]<'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |             ^~~~~~~~~~~
a.cc:16:25: warning: missing terminating ' character
   16 |     if(s[i]<'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |                         ^
a.cc:16:25: error: missing terminating ' character
   16 |     if(s[i]<'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:16:24: error: expected ';' before numeric constant
   16 |     if(s[i]<'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |                        ^
      |                        ;
a.cc:18:20: error: expected ')' before ';' token
   18 |     system("pause");
      |                    ^
      |                    )
a.cc:16:7: note: to match this '('
   16 |     if(s[i]<'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |       ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <iostream>
#include<string>
#include <cmath> 
using namespace std;   
int main()  
{ 
    int a,b;
    cin>>a>>b;
    string s;
    cin>>s;
    if(s.size()!=(a+b+1)){cout<<"NO"<<endl;system("pause");return 0;}
    else if(s[a]!='-'){cout<<"NO"<<endl;system("pause");return 0;}
    else
    s[a]=5;
    for(int i=0;i<s.size();i++){
    if(s[i]'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
    cout<<"YES"<<endl;
    system("pause");
    return 0;
}

Compiler output:
a.cc:16:12: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   16 |     if(s[i]'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |            ^~~~~~~~~~~
a.cc:16:24: warning: missing terminating ' character
   16 |     if(s[i]'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |                        ^
a.cc:16:24: error: missing terminating ' character
   16 |     if(s[i]'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:16:12: error: expected ';' before '\x5b695d3e'
   16 |     if(s[i]'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |            ^~~~~~~~~~~
      |            ;
a.cc:16:11: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   16 |     if(s[i]'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |           ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1265:7: note: declared here
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
a.cc:18:20: error: expected ')' before ';' token
   18 |     system("pause");
      |                    ^
      |                    )
a.cc:16:7: note: to match this '('
   16 |     if(s[i]'\'||s[i]>'9'){cout<<"NO"<<endl;system("pause");return 0;}}
      |       ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int a, b;
char s[15];

int main() {
	cin >> a >> b;
	getchar();
	gets(s);
	bool flag = true;
	for (int i = 0; i <= a + b; i ++) {
		if (i == a && s[i] != '-') {
			flag = false;
			break;
		} else if (!(s[i] >= '0' && s[i] <= '9')) {
			flag = false;
			break;
		}
	}
	if (flag)
		cout << "Yes";
	else
		cout << "No";
	cout << endl;

	return 0;
}

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

import java.util.Scanner;
public class Main{
    public static void main(String[]args){
        Scanner sc=new Scanner(System.in);
        int A,B=sc.nextInt();
        String S=sc.nextLine();
        String[] SS=S.split("-",0);
        if(SS[0].length()==A&&SS[1].length()==B){
            System.out.println("Yes");

        }else{
            System.out.println("No");
        }

        
        


    }
}


Compiler output:
Main.java:8: error: variable A might not have been initialized
        if(SS[0].length()==A&&SS[1].length()==B){
                           ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[]args){
        Scanner sc=new Scanner(System.in);
        int A,B=sc.nextInt();
        String S=sc.nextLine();
        String[] SS=S.split("-",0);
        if(SS[0].length()=A&&SS[1].length()==B){
            System.out.println("Yes");

        }else{
            System.out.println("No");
        }

        
        


    }
}


Compiler output:
Main.java:8: error: unexpected type
        if(SS[0].length()=A&&SS[1].length()==B){
                       ^
  required: variable
  found:    value
Main.java:8: error: bad operand types for binary operator '&&'
        if(SS[0].length()=A&&SS[1].length()==B){
                           ^
  first type:  int
  second type: boolean
2 errors
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <iostream>
#include <string>
#define max(x, y)	(((x) > (y))? (x) : (y))
#define abs(x)		(((x) < 0)? (-1*(x)) : (x))
#define REP(x,y)	for (i=(x);i<(y);i++)
using namespace std;

//int dp[10000][10000];
int i,A,B;
string S;

int main() {
	cin >> A >> B ;
  	cin >> S;
  	bool ng;
  
  	REP(0,A+B+1){
	    if (i!=A && S[i]=='-') ng=TRUE;
    } 
  
  	if ( !ng && S[A] == '-'  && S.size() == (A+B+1))
		cout << "Yes" << endl;
  	else 
		cout << "No" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:39: error: 'TRUE' was not declared in this scope
   21 |             if (i!=A && S[i]=='-') ng=TRUE;
      |                                       ^~~~
Language: C++

#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
//#include <random>
//#include <unordered_set>
#include <complex>
using namespace std;
int main()
{
    int a,b,i;
    bool good=true;
    string s;
    cin>>a>>b>>s;
    if((s.size()!=(a+b+1))or(s[a]!='-')) good=false;
    for(i=0;i<s.size();i++) if(i!=a) if((s[i]!='1')or(s[i]!='2')or(s[i]!='3')or(s[i]!='4')or(s[i]!='5')or(s[i]!='6')or(s[i]!='7')or(s[i]!='8')or(s[i]!='9')or(s[i]!='0'))
                                     else good=false; 
    if(good==true) cout<<"Yes";
    else cout<<"No";
    system ("pause"); 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:38: error: expected primary-expression before 'else'
   30 |                                      else good=false;
      |                                      ^~~~
Language: C++

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


int main(){
	char str[11];
	int a,b;
	cin >> a >> b;
	int check = 1;
	for( int i = 0 ; i < a; i++ ){
		cin >> str[i];
		if ( isdigit(str[i]) ) else check = 0;
	}
	
	cin >> str[a];
	if ( str[a] == '-' ) else check = 0;
	
	for( int i = a + 1 ; i < a + b + 1 ; i++ ){
		cin >> str[i];
		if ( isdigit(str[i]) ) else check = 0;
	}
	
	if ( check ) cout << "Yes"; else cout << "No";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:40: error: expected primary-expression before 'else'
   16 |                 if ( isdigit(str[i]) ) else check = 0;
      |                                        ^~~~
a.cc:20:30: error: expected primary-expression before 'else'
   20 |         if ( str[a] == '-' ) else check = 0;
      |                              ^~~~
a.cc:24:40: error: expected primary-expression before 'else'
   24 |                 if ( isdigit(str[i]) ) else check = 0;
      |                                        ^~~~
Language: C++

#include<stdio.h>
int main()
{

	int a,b;
	char str[100];
	scanf("%d",&a);
    scanf("%d",&b);
	getchar();
    scanf("%s",str);
    int i=0;
    for( i=0;i<a;i++){
     if(str[i]>='0' && str[i]<='9')
     {
     //putchar(str[i]);
    //continue;
     }
     else{
		printf("No\n");
		return 0;
		}
	}

    if(str[i]!='-') {
    //putchar(str[i]);
    printf("No\n");
    return 0;
    }
i++;
for( ;i<strlen(str);i++) if(str[i]>='0' && str[i]<='9') {

}
    else{
    printf("No\n");
    return 0;
    }
    printf("Yes\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'strlen' was not declared in this scope
   30 | for( ;i<strlen(str);i++) if(str[i]>='0' && str[i]<='9') {
      |         ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 | int main()
Language: C++

#include<bits/stdc++.h>
usinga namespace std;
int main()
{

	int a,b;
	char str[100];
	scanf("%d",&a);
    scanf("%d",&b);
	getchar();
    scanf("%s",str);
    int i=0;
    for( i=0;i<a;i++){
     if(str[i]>='0' && str[i]<='9')
     {
     //putchar(str[i]);
    //continue;
     }
     else{
		printf("No\n");
		return 0;
		}
	}

    if(str[i]!='-') {
    //putchar(str[i]);
    printf("No\n");
    return 0;
    }
i++;
for( ;i<strlen(str);i++) if(str[i]>='0' && str[i]<='9') {

}
    else{
    printf("No\n");
    return 0;
    }
    printf("Yes\n");
    return 0;
}


Compiler output:
a.cc:2:1: error: 'usinga' does not name a type
    2 | usinga namespace std;
      | ^~~~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
   int a, b, flag = 0;
   string s;
   cin >> a >> b >> s;

   for(int i = 0; i < a + b + 1; i++)
   {
    if(s[i] == '-')
        continue;
     flag++;

   }

   if(flag == a + b)
    cout << "YES" << endl;
   else
    cout << "NO" << endl;



    return main 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:12: error: invalid conversion from 'int (*)()' to 'int' [-fpermissive]
   26 |     return main 0;
      |            ^~~~
      |            |
      |            int (*)()
a.cc:26:16: error: expected ';' before numeric constant
   26 |     return main 0;
      |                ^~
      |                ;
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
   int a, b, flag = 0;
   string s;
   cin >> a >> b >> s;

   for(int i = 0; i < a + b + 1; i++)
   {
     if(s[i] == '-')
     {
        continue;
     }
     else
        flag++;
   }

   if(flag == a + b)
    cout << "YES" << endl;
   else
    cout << "NO" << endl;



    return 0;

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

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

int main()
{
    int a,b;
    scanf("%d %d",&a, &b);
    char code[a+b+1];
    scanf("%s",code);
    if(code[a] != '-') {
        printf("No\n");
        return 0;
    }
    else {
        for(int i = 0; i<a+b+1 && i!=a; i++) {
            if(code[i] == '-') {
                printf("No\n");
                return 0;
            }
        }
    }
    printf("Yes\n");
    return 0;

}


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

#include<stdio.h>
int main()
{
    int i,a,b,flag;
    while(scanf("%d %d",&a,&b)!=EOF)
    {
        char str[a+b+1],c;
        flag=1;
        c=getchar();
        scanf("%[0-9-]s",str);
        for(i=0;str[i]!='\0';i++)
        {
            if(i==a)
            continue;
            if(str[a]=='-'&&str[i]!='-')
                flag=0;
        }
        if(flag==0)
            printf("Yes\n");
        else
            printf("No\n");

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C++

// Contest.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cctype>

using namespace std;

int main()
{
	int A, B;
	cin >> A >> B;
	string s;
	cin >> s;
	if (s[A] == '-') {
		s.erase(s.begin()+A);
		if (all_of(s.cbegin(), s.cend(), isdigit)) cout << "Yes";
		else cout << "No";
	}
	else cout << "No";
	cout << s;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:27: error: no matching function for call to 'all_of(std::__cxx11::basic_string<char>::const_iterator, std::__cxx11::basic_string<char>::const_iterator, <unresolved overloaded function type>)'
   20 |                 if (all_of(s.cbegin(), s.cend(), isdigit)) cout << "Yes";
      |                     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:7:
/usr/include/c++/14/bits/stl_algo.h:410:5: note: candidate: 'template<class _IIter, class _Predicate> bool std::all_of(_IIter, _IIter, _Predicate)'
  410 |     all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred)
      |     ^~~~~~
/usr/include/c++/14/bits/stl_algo.h:410:5: note:   template argument deduction/substitution failed:
a.cc:20:27: note:   couldn't deduce template parameter '_Predicate'
   20 |                 if (all_of(s.cbegin(), s.cend(), isdigit)) cout << "Yes";
      |                     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:30:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Predicate> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> std::all_of(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate)'
   30 | all_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred);
      | ^~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:30:1: note:   candidate expects 4 arguments, 3 provided
Language: C++

//競技プログラミング　テンプレ
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cstdlib> //abs() これは整数のみ

using namespace std;

#define REP(i,n) for(int i = 0; i < (int)(n); ++i)

const int max_v = 300;
const int INF = 1000000;



int main() {
	int a,b, ans=0, ten = 10;
    string s;
	cin >> a >> b;
    cin >> s;

    REP(i,a){
        if(int(s[i]) == 45) {cout << "No"  << endl; return 0;} 
    }
    if(s[a] != '-') {cout << "No" <<   endl; return 0;} 
    int aa = a+1;
    int bb = a+b+;
    for(aa; aa <= bb; aa++){
        if(s[aa] == '-') {cout << "No" << endl; return 0;} 
    }
    
	cout << "Yes" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:18: error: expected primary-expression before ';' token
   30 |     int bb = a+b+;
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,b,n,m;
char s;
int main()
{
	scanf("%d %d",&a,%b);
	scanf("%d%c%d",%n,&s,&m);
	if(s=='-')
	{
		printf("Yes");
	}
	else
	{
		printf("No");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected primary-expression before '%' token
    7 |         scanf("%d %d",&a,%b);
      |                          ^
a.cc:8:24: error: expected primary-expression before '%' token
    8 |         scanf("%d%c%d",%n,&s,&m);
      |                        ^
Language: C++

include<bits/stdc++.h>
using namespace std;
 
int main()
{
	string s;
	int a,b;
	
	cin>>a>>b;
	cin>>s;
	
	for(int i=0;i<=s.size();i++)
	{
		if(i==a)
		{
			if(s[i]!='-')
			{
				cout<<"No";
				return 0;
			}
		}
		else if(!isdigit(s[i]))  cout<<"No";
	}
	
	cout<<"Yes";
	return 0; 
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope
    6 |         string s;
      |         ^~~~~~
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin>>a>>b;
      |         ^~~
a.cc:10:14: error: 's' was not declared in this scope
   10 |         cin>>s;
      |              ^
a.cc:18:33: error: 'cout' was not declared in this scope
   18 |                                 cout<<"No";
      |                                 ^~~~
a.cc:22:26: error: 'isdigit' was not declared in this scope
   22 |                 else if(!isdigit(s[i]))  cout<<"No";
      |                          ^~~~~~~
a.cc:22:42: error: 'cout' was not declared in this scope
   22 |                 else if(!isdigit(s[i]))  cout<<"No";
      |                                          ^~~~
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |         cout<<"Yes";
      |         ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  string s;
  cin>>s;
  if(s.size()!=(a+b+1)){
    cout<<"No"<<endl;
    return 0;
  }
  for(int i=0;i<s.size();i++){
    if(i!=a){
      if(!(s[i]>='0' && s[i]<='9')){
        cout<<"No"<<ehdl;
        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:16:21: error: 'ehdl' was not declared in this scope
   16 |         cout<<"No"<<ehdl;
      |                     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  string s;
  cin>>s;
  if(s.size()!=(a+b+1)){
    cout<<"NO"<<endl;
    return 0;
  }
  for(int i=0;i<s.size();i++){
    if(i!=a){
      if(!(s[i]>='0' && s[i]<='9')){
        cout<<"NO"<<ehdl;
        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:16:21: error: 'ehdl' was not declared in this scope
   16 |         cout<<"NO"<<ehdl;
      |                     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'ehdl' was not declared in this scope
   16 |         cout<<"NO"<<ehdl;
      |                     ^~~~
a.cc:19:15: error: invalid types 'int[int]' for array subscript
   19 |     }else if(a[i]!='-'){
      |               ^
a.cc:22:6: error: expected '}' at end of input
   22 |     }
      |      ^
a.cc:13:30: note: to match this '{'
   13 |   for(int i=0;i<s.size();i++){
      |                              ^
a.cc:22:6: error: expected '}' at end of input
   22 |     }
      |      ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MAX_N (int)2e5+20
#define INF 2e9+20
#define pb push_back
#define F first
#define S second
typedef long long LL;
#define int LL
typedef pair<int,int> pii;
const int delta=(int)1e9+7;
int a,b; string s;
main(){
	ios_base::sync_with_stdio(false); cin.tie(0);
        cin>>a>>b>>s;
        for(int i=0;i<s.size();++i){
              if((i!=a && (s[i]<'0' || s[i] >'9')) || (i==a && s[i]!='-'))	return cout<<"No\n",0;
        }
	cout<<"Yes";
	return cout<<endl;
}

Compiler output:
a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   13 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:20:20: error: cannot convert 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int' in return
   20 |         return cout<<endl;
      |                ~~~~^~~~~~
      |                    |
      |                    std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
Language: C++

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

    public static boolean isInt(String str){
        for (int i = 0; i < str.length(); i++){
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int a = in.nextInt();
        int b = in.nextInt();
        String [] arr = in.next().split("-");
        if (arr.length == 2 && arr[0].length() == a && arr[1].length() == b){
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Scanner;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main {
      | ^~~~~~
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Sample {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		}
	}
}


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

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

int main(){

  int a,b;
  int i;
  string s,s1,s2;
  cin >> a >> b;
  cin >> s;
  if(strncmp("-",&s[a],1)==0){
    
    s1=s.substr(0,a);
    s2=s.substr(a+1,b);

    if(s1.size() == a && s2.size()==b){
      cout << "yes" << endl;
    }
    else{
      cout << "no" << endl;
    }
  }
  else{
      cout << "no" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:6: error: 'strncmp' was not declared in this scope
   13 |   if(strncmp("-",&s[a],1)==0){
      |      ^~~~~~~
a.cc:2:1: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<stdio.h>
Language: C++

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

int main(){

  int a,b;
  int i;
  string s,s1,s2;
  cin >> a >> b;
  cin >> s;
  if(strncmp("-",&s[a],1)==0){
    
    s1=s.substr(0,a);
    s2=s.substr(a+1,b);

    if(s1.size() == a && s2.size()==b){
      cout << "yes" << endl;
    }
    else{
      cout << "no" << endl;
    }
  }
  else{
      cout << "no" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: 'strncmp' was not declared in this scope
   12 |   if(strncmp("-",&s[a],1)==0){
      |      ^~~~~~~
a.cc:2:1: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: 'strlen' was not declared in this scope
   20 |   if (strlen(S)==cnt) {
      |       ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | #include <string>