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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvec;
typedef vector<vector<bool>> vveb;
typedef vector<vector<string>> vves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define pp pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
//const int64 INF = 1LL << 58;
#define dame { puts("-1"); return 0;}
#define YES { cout << "YES" << endl; return 0; }
#define NO { cout << "NO" << endl; return 0; }
#define Yes { cout << "Yes" << endl; return 0; }
#define No { cout << "No" << endl; return 0; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};

int main(){
 cin.tie(0);
 ios::sync_with_stdio(false);
  int a,b;
  str c, d;
  cin >> a >> b >> c;
  str d = to_string(a) + "-" + to_string(b);
  if(c == d)cout << "yes";
  else cout << "no";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:3: error: 'str' was not declared in this scope; did you mean 'std'?
   50 |   str c, d;
      |   ^~~
      |   std
a.cc:51:20: error: 'c' was not declared in this scope
   51 |   cin >> a >> b >> c;
      |                    ^
a.cc:52:6: error: expected ';' before 'd'
   52 |   str d = to_string(a) + "-" + to_string(b);
      |      ^~
      |      ;
a.cc:53:11: error: 'd' was not declared in this scope
   53 |   if(c == d)cout << "yes";
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvec;
typedef vector<vector<bool>> vveb;
typedef vector<vector<string>> vves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define pp pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
//const int64 INF = 1LL << 58;
#define dame { puts("-1"); return 0;}
#define YES { cout << "YES" << endl; return 0; }
#define NO { cout << "NO" << endl; return 0; }
#define Yes { cout << "Yes" << endl; return 0; }
#define No { cout << "No" << endl; return 0; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};

int main(){
 cin.tie(0);
 ios::sync_with_stdio(false);
  int a,b;
  str b;
  cin >> a >> b >> c;
  str d = to_string(a) + "-" + to_string(b);
  if(c == d)cout << "yes";
  else cout << "no";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:3: error: 'str' was not declared in this scope; did you mean 'std'?
   50 |   str b;
      |   ^~~
      |   std
a.cc:51:20: error: 'c' was not declared in this scope
   51 |   cin >> a >> b >> c;
      |                    ^
a.cc:52:6: error: expected ';' before 'd'
   52 |   str d = to_string(a) + "-" + to_string(b);
      |      ^~
      |      ;
a.cc:53:11: error: 'd' was not declared in this scope
   53 |   if(c == d)cout << "yes";
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvec;
typedef vector<vector<bool>> vveb;
typedef vector<vector<string>> vves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define pp pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
//const int64 INF = 1LL << 58;
#define dame { puts("-1"); return 0;}
#define YES { cout << "YES" << endl; return 0; }
#define NO { cout << "NO" << endl; return 0; }
#define Yes { cout << "Yes" << endl; return 0; }
#define No { cout << "No" << endl; return 0; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};

int main(){
 cin.tie(0);
 ios::sync_with_stdio(false);
  
  cin >> a >> b >> c;
  str d = to_string(a) + "-" + to_string(b);
  if(c == d)cout << "yes";
  else cout << "no";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:10: error: 'a' was not declared in this scope
   50 |   cin >> a >> b >> c;
      |          ^
a.cc:50:15: error: 'b' was not declared in this scope; did you mean 'pb'?
   50 |   cin >> a >> b >> c;
      |               ^
      |               pb
a.cc:50:20: error: 'c' was not declared in this scope; did you mean 'sc'?
   50 |   cin >> a >> b >> c;
      |                    ^
      |                    sc
a.cc:51:3: error: 'str' was not declared in this scope; did you mean 'std'?
   51 |   str d = to_string(a) + "-" + to_string(b);
      |   ^~~
      |   std
a.cc:52:11: error: 'd' was not declared in this scope; did you mean 'ld'?
   52 |   if(c == d)cout << "yes";
      |           ^
      |           ld
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:41: error: expected primary-expression before 'return'
   17 |     if (s[a+1+1]!='-') cout<<"No"<<endl,return 0;
      |                                         ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main ()[
  int A,B;
  string S;
  cin>>A>>B;
  cin>>S;
  int c=S.size();
  if(A>5||A<1||B>5||b<1){
    cout<<"No"<<endl;
  }else if(!c==A+B+1||c>9||c<0){
    cout<<"No"<<endl;
  }else if(!S[A+1]=="-"){
    cout<<"No"<<endl;
  }else {
    cout<<"Yes"<<endl;
  }
return 0;
  }

Compiler output:
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int A,B;
      |   ^~~
a.cc:3:13: error: expected ']' before 'int'
    3 | int main ()[
      |             ^
      |             ]
    4 |   int A,B;
      |   ~~~        
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin>>A>>B;
      |   ^~~
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin>>S;
      |   ^~~
a.cc:9:3: error: expected unqualified-id before 'if'
    9 |   if(A>5||A<1||B>5||b<1){
      |   ^~
a.cc:11:4: error: expected unqualified-id before 'else'
   11 |   }else if(!c==A+B+1||c>9||c<0){
      |    ^~~~
a.cc:13:4: error: expected unqualified-id before 'else'
   13 |   }else if(!S[A+1]=="-"){
      |    ^~~~
a.cc:15:4: error: expected unqualified-id before 'else'
   15 |   }else {
      |    ^~~~
a.cc:18:1: error: expected unqualified-id before 'return'
   18 | return 0;
      | ^~~~~~
a.cc:19:3: error: expected declaration before '}' token
   19 |   }
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
char s[100001];
int main(){
    int a,b;
    cin>>a>>b;
    for(int i=1;i<=a+b+1;i++){
        cin>>s[i];
    }
    for(int i=1;i<=a+b+1;i++){
        if(s[i]<48 && i!=a+1 || s[i]>58 && i!=a+1){
            cout<<"No";
            return 0;
        }
        if(i==a+1 && s[i]!='-'){
            cout<<"No"；
            return 0;
        }
    }
    cout<<"Yes";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: unable to find string literal operator 'operator""\U0000ff1b' with 'const char [3]', 'long unsigned int' arguments
   16 |             cout<<"No"；
      |                   ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: expected ';' before '}' token
    8 |     f &= (i==a?s[i]=='-':isdigit(s[i]))
      |                                        ^
      |                                        ;
    9 |   }
      |   ~
Language: C++

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

int main(){
  int a,b;
  cin >> a >> b;
  char s[12];
  cin >> s
    
    for(int i=0;i<a;++i){
      if(!('0'<=s[i] && s[i] <='9')){ //if(!(~)) == if(Not(~))
        cout << "No" << endl;
        return 0;
      }
    }
  if(s[a] !='-'){
    cout << "No" << endl;
    return 0;
  }
for(int i=a+1;i<a+b;i++){
  if(!('0'<=s[i] && s[i] <= '9')){
    cout << "No" << endl;
    return 0;
  }
}
  cout << "Yes" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected ';' before 'for'
    8 |   cin >> s
      |           ^
      |           ;
    9 | 
   10 |     for(int i=0;i<a;++i){
      |     ~~~    
a.cc:10:17: error: 'i' was not declared in this scope
   10 |     for(int i=0;i<a;++i){
      |                 ^
Language: C++

a,b=map(int,input().split())
s=input()
ans=0
for i in range(a+b+1):
    if i==a and s[i]=="-":
        ans+=1
        print("a")
    elif i!=a and s[i].isdecimal()==True:
        ans+=1
if ans==a+b+1:
    print("Yes")
else:
    print("No")

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b=map(int,input().split())
      | ^
Language: C++

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

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

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

#include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: conflicting declaration 'bool b'
   10 |   bool b = 1;
      |        ^
a.cc:7:10: note: previous declaration as 'int b'
    7 |   int a, b;
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:30:6: error: expected '}' at end of input
   30 |     }
      |      ^
a.cc:11:23: note: to match this '{'
   11 |   for(int i=0;i<A;i++){
      |                       ^
a.cc:30:6: error: expected '}' at end of input
   30 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  
  int A,B;
  char c[11];
  
  cin >> c;
  
  for(int i=0;i<A;i++){
    if(c[i]<'0' || c[i]>'9'){
      cout<<"No"<<endl;
      return 0;
    }
    
    if(c
    
    for(int i=A+1;i<A+B+1;i++){
    if(c[i]<'0' || c[i]>'9'){
      cout<<"No"<<endl;
      return 0;
    }  

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: expected ')' before 'for'
   17 |     if(c
      |       ~ ^
      |         )
   18 | 
   19 |     for(int i=A+1;i<A+B+1;i++){
      |     ~~~  
a.cc:19:30: error: expected ';' before ')' token
   19 |     for(int i=A+1;i<A+B+1;i++){
      |                              ^
      |                              ;
a.cc:23:6: error: expected '}' at end of input
   23 |     }
      |      ^
a.cc:11:23: note: to match this '{'
   11 |   for(int i=0;i<A;i++){
      |                       ^
a.cc:23:6: error: expected '}' at end of input
   23 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int A,B;
  int flag1 = 0;
  int flag2 = 0;
  cin >> A >> B;
  string s;
  cin>>s;
  if(s[A]!= '-'){
   cout << "No" <<endl;
  }else{
    for(int i=0;i<A;i++){
      if(0>s[i] || s[i]>9){
           flag1 = 1;
        
      }
    }
    for(int i=A+1;i<A+B+2;i++){
       if(0>s[i] || s[i]>9){
           cout<< "No" <<endl;
         flag2 = 1;
      }
    }
    
  }
  if(flag1 = 1 && flag2 = 1){
    cout << "No" << endl;
  }else{
    cout<< "Yes" << endl; 
}
  flag1=0;
  flag2=0;


Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: lvalue required as left operand of assignment
   28 |   if(flag1 = 1 && flag2 = 1){
      |              ~~^~~~~~~~
a.cc:34:11: error: expected '}' at end of input
   34 |   flag2=0;
      |           ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
 int A,B;
  cin >> A >> B;
  string s;
  cin>>s;
  if(s[A]!=-){
    cout<< "No" <<endl;
  }else{
    for(int i=0;i<A;i++){
      if(0>s[i] || s[i]>9){
           cout<< "No" <<endl;
      }
    }
    for(int i=A+1;i<A+B+2;i++){
       if(0>s[i] || s[i]>9){
           cout<< "No" <<endl;
      }else{
         cout << "Yes" <<endl;
       }
    }
    
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before ')' token
    9 |   if(s[A]!=-){
      |             ^
Language: C++

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

int main() {
 int A,B;
  cin >> A >> B;
  string s;
  cin>>s;
  if(s[A]!= "-"){
    cout<< "No" <<endl;
  }else{
    for(int i=0;i<A;i++){
      if(0>s[i] || s[i]>9){
           cout<< "No" <<endl;
      }
    }
    for(int i=A+1;i<A+B+2;i++){
       if(0>s[i] || s[i]>9){
           cout<< "No" <<endl;
      }else{
         cout << "Yes" <<endl;
       }
    }
    
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s[A]!= "-"){
Language: Java

public 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();
		scan.close();
		int check=0;
		for(int i=0;i<a+b+1;i++) {
			if(s.charAt(i)=='-' &&i!=a) {
				check=1;
			}
		}

		System.out.println((check==1)? "No":"Yes");
	}

}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int,  int>;
using pll = pair<ll, ll>;
using edge = pair<int, ll>;
using Graph = vector<vector<int>>; 
using WeightedGraph = vector<vector<edge>>;
const ll INF = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;

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


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  bool flag = true;
  int sLeng = s.length();
  
  if(a < 1 || b > 5 || 0 < sLeng || sLeng > 9 || sLeng != (a + b + 1)){
    flag = false;
  }

  for(int i=0; i < sLeng; i++){

      char sStr = s[i];

      if(i != a){
          if(sStr == "-"){
              flag = false;
          }
      } else {
          if(sStr != "-"){
              flag = false;
          }
      }
  }

  if(flag == true){
    cout << "Yes";
  } else {
    cout << "No";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |           if(sStr == "-"){
      |              ~~~~~^~~~~~
a.cc:24:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |           if(sStr != "-"){
      |              ~~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  bool flag = true;
  int sLeng = s.length();
  
  if(a < 1 || b > 5 || 0 < sLeng || sLeng > 9 || sLeng != (a + b + 1)){
    flag = false;
  }

  for(var i=0; i < sLeng; i++){

      char sStr = s[i];

      if(i != a){
          if(sStr == "-"){
              flag = false;
          }
      } else {
          if(sStr != "-"){
              flag = false;
          }
      }
  }

  if(flag == true){
    cout << "Yes";
  } else {
    cout << "No";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'var' was not declared in this scope
   15 |   for(var i=0; i < sLeng; i++){
      |       ^~~
a.cc:15:16: error: 'i' was not declared in this scope
   15 |   for(var i=0; i < sLeng; i++){
      |                ^
a.cc:20:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |           if(sStr == "-"){
      |              ~~~~~^~~~~~
a.cc:24:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |           if(sStr != "-"){
      |              ~~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  if( s.length() == (a + b + 1)){
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b;
  cin >> a >> b >> s >> endl;
  if( s.length() == (a + b + 1)){
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 's' was not declared in this scope
    6 |   cin >> a >> b >> s >> endl;
      |                    ^
a.cc:11:4: error: expected '}' at end of input
   11 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#define rep(i, n) for(i = 0; i < n; i++)
#define rrep(i, n) for(i = n - 1; i >= 0; i--)
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'i' was not declared in this scope
   14 |         rep(i, a) if (!('0' <= s[i] && s[i] <= '9')) { cout << "No" << endl; return 0; }
      |             ^
a.cc:4:23: note: in definition of macro 'rep'
    4 | #define rep(i, n) for(i = 0; i < n; i++)
      |                       ^
a.cc:15:13: error: 'i' was not declared in this scope
   15 |         rep(i, b) if (!('0' <= s[a+1+i] && s[a+1+i] <= '9')) { cout << "No" << endl; return 0; }
      |             ^
a.cc:4:23: note: in definition of macro 'rep'
    4 | #define rep(i, n) for(i = 0; i < n; i++)
      |                       ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       if(s[i] == "-"}{
a.cc:10:21: error: expected ')' before '}' token
   10 |       if(s[i] == "-"}{
      |         ~           ^
      |                     )
a.cc:10:21: error: expected primary-expression before '}' token
a.cc: At global scope:
a.cc:15:4: error: expected unqualified-id before 'if'
   15 |    if(s[a] != "-"){
      |    ^~
a.cc:19:3: error: expected unqualified-id before 'for'
   19 |   for(int i = a + 1; i < a + 1 + b; i++){
      |   ^~~
a.cc:19:22: error: 'i' does not name a type
   19 |   for(int i = a + 1; i < a + 1 + b; i++){
      |                      ^
a.cc:19:37: error: 'i' does not name a type
   19 |   for(int i = a + 1; i < a + 1 + b; i++){
      |                                     ^
a.cc:25:2: error: 'cout' does not name a type
   25 |  cout << "Ok" << endl;
      |  ^~~~
a.cc:26:10: error: expected unqualified-id before 'return'
   26 |          return 0;
      |          ^~~~~~
a.cc:27:10: error: expected declaration before '}' token
   27 |          }
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected ';' before 'for'
    7 |         scanf("%c",c)
      |                      ^
      |                      ;
    8 |         for(int j=1;j<=1;j++){
      |         ~~~           
a.cc:8:21: error: 'j' was not declared in this scope
    8 |         for(int j=1;j<=1;j++){
      |                     ^
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int a,b;
	char c[10]; 
	cin>>a>>b;
	cin>>c;
	if(c[a]!='-'){
		cout<<"No"<<endl;
		return 0;
	}
	int tot=0;
	for(int i=1;i<strlen(c);i++){
		if(c[i]<'0' || c[i]>'9'){
			tot++;
		}
	}
	if(tot>1){
		cout<<"No"<<endl;
	}else{
		cout<<"Yes"<<endl;
	}
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: 'strlen' was not declared in this scope
   14 |         for(int i=1;i<strlen(c);i++){
      |                       ^~~~~~
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 | using namespace std;
Language: C++

# include < cstdio >
int A , B ;
char s [12];
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 ( int i = A +1; i <= A + B ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
{
puts (" No "); return 0;
}
puts (" Yes ");
}

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

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

Compiler output:
a.cc:15:3: error: expected unqualified-id before 'if'
   15 |   if(s[a+1]=='-' && count==1) cout << "Yes" << endl;
      |   ^~
a.cc:16:9: error: expected unqualified-id before 'else'
   16 |         else cout << "No" << endl;
      |         ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int a,b;
	char s[1001];
	cin>>a>>b;
	cin>>s;
	for(int i=0;i<strlen(s);i++)
	{
		if(s[a]!='-'){
			cout<<"NO"<<endl;
			return 0;
		}
	
	
		if(i!=a)
		{
			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:9:23: error: 'strlen' was not declared in this scope
    9 |         for(int i=0;i<strlen(s);i++)
      |                       ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
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();
   char[] c = sc.next().toCharArray();
   boolean flg = true;
   
   for(i=0;i<A;i++)
   {
     if(c[i]=='-') flg = false; 
   }
   if(c[A]!='-') flg = false;
   for(i=A+1;i<B;i++)
   {
     if(c[i]=='-') flg = false; 
   }

   if(flg) System.out.println("Yes");
   else System.out.println("No");
 }
}

Compiler output:
Main.java:11: error: cannot find symbol
   for(i=0;i<A;i++)
       ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
   for(i=0;i<A;i++)
           ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
   for(i=0;i<A;i++)
               ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
     if(c[i]=='-') flg = false; 
          ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
   for(i=A+1;i<B;i++)
       ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
   for(i=A+1;i<B;i++)
             ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
   for(i=A+1;i<B;i++)
                 ^
  symbol:   variable i
  location: class Main
Main.java:18: error: cannot find symbol
     if(c[i]=='-') flg = false; 
          ^
  symbol:   variable i
  location: class Main
8 errors
Language: C++

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

int main() {
  int A = 0, B = 0;
  string S = "";
  cin >> A >> B >> S;
  for(int i = 0; i < S.size(); i++) {
    if(A + 1 != i && S[i] == "-") {
      cout << "No" << endl;
      return;
    }
    if(A + B != i) {
      cout << "No" << endl;
      return;
    }
    if(A + 1 != i && (S[i] <= 0 || S[i] >= 9)) {
      cout << "No" << endl;
      return;
    }
  }
  cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(A + 1 != i && S[i] == "-") {
a.cc:11:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |       return;
      |       ^~~~~~
a.cc:15:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |       return;
      |       ^~~~~~
a.cc:19:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   19 |       return;
      |       ^~~~~~
Language: C++

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

int main() {
  int A = 0, B = 0;
  string S = "";
  cin >> A >> B >> S;
  for(int i = 0; S[i].compare(""); i++) {
    if(A + 1 != i && S[i].compare("-")) {
      cout << "No" << endl;
      return;
    }
    if(A + B != i) {
      cout << "No" << endl;
      return;
    }
    if(A + 1 != i && (S[i] <= 0 || S[i] >= 9)) {
      cout << "No" << endl;
      return;
    }
  }
  cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: request for member 'compare' in 'S.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    8 |   for(int i = 0; S[i].compare(""); i++) {
      |                       ^~~~~~~
a.cc:9:27: error: request for member 'compare' in 'S.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    9 |     if(A + 1 != i && S[i].compare("-")) {
      |                           ^~~~~~~
a.cc:11:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |       return;
      |       ^~~~~~
a.cc:15:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |       return;
      |       ^~~~~~
a.cc:19:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   19 |       return;
      |       ^~~~~~
Language: C++

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

int main() {
  int A = 0, B = 0;
  string S = "";
  cin >> A >> B >> S;
  for(int i = 0; S[i] != ""; i++) {
    if(A + 1 != i && S[i] == "-") {
      cout << "No" << endl;
      return 0;
    }
    if(A + B != i) {
      cout << "No" << endl;
      return 0;
    }
    if(A + 1 != i && (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:8:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   for(int i = 0; S[i] != ""; i++) {
a.cc:9:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(A + 1 != i && S[i] == "-") {
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   for(int i = 0; S[i] != ""; i++) {
a.cc:9:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(A + 1 != i && S[i] == "-") {
a.cc:11:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |       return;
      |       ^~~~~~
a.cc:15:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |       return;
      |       ^~~~~~
a.cc:19:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   19 |       return;
      |       ^~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   for(int i = 0; S[i] != ""; i++) {
a.cc:9:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(A + 1 != i && S[i] == "-") {
a.cc:11:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |       return;
      |       ^~~~~~
a.cc:15:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |       return;
      |       ^~~~~~
a.cc:17:46: error: expected ')' before '{' token
   17 |     if(A + 1 != i && (S[i] <= 0 || S[i] >= 9) {
      |       ~                                      ^~
      |                                              )
a.cc:21:3: error: expected primary-expression before '}' token
   21 |   }
      |   ^
Language: C++

#include<algorithm>
using namespace std;
typedef long long ll;
int main() {
	int a, b;
	cin >> a >> b;
	string s;
	cin >> s;
	int count = 0; 
	int ans;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == '-') {
			count++;
			ans = i;
		}
	}
	if (count != 1) {
		cout << "No" << endl;
		return 0;
	}
	else if (count == 1 && ans == a) {
		cout << "Yes" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> a >> b;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string s;
      |         ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include<algorithm>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:8:16: error: 's' was not declared in this scope
    8 |         cin >> s;
      |                ^
a.cc:18:17: error: 'cout' was not declared in this scope
   18 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:18:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:33: error: 'endl' was not declared in this scope
   18 |                 cout << "No" << endl;
      |                                 ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<algorithm>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:22:17: error: 'cout' was not declared in this scope
   22 |                 cout << "Yes" << endl;
      |                 ^~~~
a.cc:22:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:34: error: 'endl' was not declared in this scope
   22 |                 cout << "Yes" << endl;
      |                                  ^~~~
a.cc:22:34: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>

using namespace std;

bool is_digit(char ch) {
  return '0' <= ch && ch <= '9';
}

bool check(int a, int b, string s)
{
  if (s.size() != a + b + 1) {
    return false;
  } else {
    for (int i = 0; i < a; i++) {
      if (!is_digit(s[i])) {
        return false;
      }
    }
          for (int i = a + 1; i < a + b + 1; i++) {
            if (!is_digit(s[i])) {
              return false;
            }
          }
  }
  return true;
}

int main()
{
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  
  cout << (check(a, b, s) ? "Yes" : "No") << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:35:51: error: expected '}' at end of input
   35 |   cout << (check(a, b, s) ? "Yes" : "No") << endl;
      |                                                   ^
a.cc:29:1: note: to match this '{'
   29 | {
      | ^
Language: Java

import java.util.*;
public class BPostalCode{
  public static void Main(String[]args){
      Scanner sc = new Scanner(System.in);

      int a = sc.nextInt();
      int b = sc.nextInt();
      String s = sc.next();
      
      int s1;
      boolean ans = true;

      if(s.charAt(a)!='-'){
        System.out.println("No");
        System.exit(0);
      }

      for(int i =0;i<a;i++){
        s1 = (int)s.charAt(i);
        if(s1>=48&&s1<58){
          ans=true;
        }else{
          System.out.println("No");
          System.exit(0);
        }
      }

      for(int i =a+1;i<s.length();i++){
        s1 = (int)s.charAt(i);
        if(s1>=48&&s1<58){
          ans=true;
        }else{
          System.out.println("No");
          System.exit(0);
        }

      }
      if(ans){
        System.out.println("Yes");
      }

  }
}


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

import java.util.*;
public class BPostalCode{
  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 s1;
      String s2;
      char s3;

      s1 = s.substring(0,a);
      s2 = s.substring(a+1,s.length());
      s3 =s.charAt(a+1);

      if(a+b+1!=s.length()){
        System.out.println("No");
        System.exit(0);
      }
      if(s1.equals("-")||s2.equals("-")){
        System.out.println("No");
        System.exit(0);
      }

      if(s1.length()==a&&s2.length()==b&&(s3=='-')){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }

  }
}


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

#include<bits/stdc++.h>

using namespace std;

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

    cout << (regex_match(s, regex("\\d{"+a+"}-\\d{"+b+"}")) ? "Yes" : "No");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:43: error: invalid operands of types 'const char*' and 'const char [6]' to binary 'operator+'
    9 |     cout << (regex_match(s, regex("\\d{"+a+"}-\\d{"+b+"}")) ? "Yes" : "No");
      |                                   ~~~~~~~~^~~~~~~~~
      |                                         |  |
      |                                         |  const char [6]
      |                                         const char*
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int S=0;
  cin>>S;
  int S=9;
  cin>>S;
  int S="-";
  cin>>S;
    cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int S'
    7 |   int S=9;
      |       ^
a.cc:5:9: note: 'int S' previously declared here
    5 |     int S=0;
      |         ^
a.cc:9:7: error: redeclaration of 'int S'
    9 |   int S="-";
      |       ^
a.cc:5:9: note: 'int S' previously declared here
    5 |     int S=0;
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int S=0=9="-"
    cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: lvalue required as left operand of assignment
    5 |     int S=0=9="-"
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int A+1="-";
    int S=0=9;
    cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected initializer before '+' token
    5 |     int A+1="-";
      |          ^
a.cc:6:11: error: lvalue required as left operand of assignment
    6 |     int S=0=9;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A=5,B=5;
  int S;
    cin>>A>>B>>S
  cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'cout'
    7 |     cin>>A>>B>>S
      |                 ^
      |                 ;
    8 |   cout<<"Yes"<<endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A=5,B=5;
  int S;
    cin>>A>>B>>S
  cout<<"Yes"<<endl;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'cout'
    7 |     cin>>A>>B>>S
      |                 ^
      |                 ;
    8 |   cout<<"Yes"<<endl;
      |   ~~~~           
a.cc:8:21: error: expected '}' at end of input
    8 |   cout<<"Yes"<<endl;
      |                     ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A=5,B=5;
    cin>>A>>B;
  cout<<'Yes'<<endl;
  

Compiler output:
a.cc:7:9: warning: multi-character character constant [-Wmultichar]
    7 |   cout<<'Yes'<<endl;
      |         ^~~~~
a.cc: In function 'int main()':
a.cc:7:21: error: expected '}' at end of input
    7 |   cout<<'Yes'<<endl;
      |                     ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A=5,B=5;
    cin>>A>>B;
  cout<<"Yes"<<endl;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected '}' at end of input
    7 |   cout<<"Yes"<<endl;
      |                     ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: expected '}' at end of input
   25 |   cout<<"Yes";
      |               ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <queue>
#include <algorithm> // sort

#define REP(i, n) for (long long i = 0; i < (n); i++) 
typedef long long ll;
static const ll mod = 1000000007;
static const ll INF = 1000000000000000000LL;
                    //999999997000000003
                    //1000000000000000000

using namespace std;

int main(){
    int A,B;
    cin >> A >> B;
    string S;
    REP >> S;
    string res = "Yes";

    REP(i,S.size())
    {
        if(i == A - 1)
        {
            if(S[i] != '-')res = "No";
        }
        else
        {
            if(S[i] == '-')res = "No";            
        }
    }


    cout << res << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'REP' was not declared in this scope
   21 |     REP >> S;
      |     ^~~
Language: C++

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

int main()
{
  int A,B ;
  string S ;
  cin>>A>>B>>S ;
  
  if(S.at(A)!='-'){
    cout<<"No"<<endl ;
    return 0;
  }else{
    for(int i=0;i!=A&&i<A+B+1;i++){
      int s=ctoi(S.at(i)) ;
      if(s<0||s>9){
        cout<<"No"<<endl ;
        return 0 ;
      }
    }
  }
  cout<<"Yes"<<endl ;
  
  return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'ctoi' was not declared in this scope; did you mean 'atoi'?
   16 |       int s=ctoi(S.at(i)) ;
      |             ^~~~
      |             atoi
Language: C++

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

int main()
{
  int A,B ;
  string S ;
  cin>>A>>B>>S ;
  
  if(S.at(A+1)!='-'){
    cout<<"No"<<endl ;
    return 0;
  }else{
    for(int i=0;i!=A+1&&i<A+B+1;i++){
      int s=ctoi(S.at(i)) ;
      if(s<0||s>9){
        cout<<"No"<<endl ;
        return 0 ;
      }
    }
  }
  cout<<"Yes"<<endl ;
  
  return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'ctoi' was not declared in this scope; did you mean 'atoi'?
   16 |       int s=ctoi(S.at(i)) ;
      |             ^~~~
      |             atoi
Language: C++

#include<iostream>
using namespace std ;

int main()
{
  int A,B ;
  string S ;
  cin>>A>>B>>S ;
  
  if(S.at(A+1)!='-'){
    cout<<"No"<<endl ;
    return 0;
  }else{
    for(int i=0;i!=A+1&&i<A+B+1;i++){
      int s=ctoi(S.at(i)) ;
      if(0>s||s>9){
        cout<<"No"<<endl ;
        return 0 ;
      }
    }
  }
  cout<<"Yes"<<endl ;
  
  return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'ctoi' was not declared in this scope; did you mean 'atoi'?
   15 |       int s=ctoi(S.at(i)) ;
      |             ^~~~
      |             atoi
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:9:29: note: to match this '{'
    9 |     for(int i=0;i<a+b+1;i++){
      |                             ^
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^