Language: C++

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

int main() {
  // ここにプログラムを追記
  int a;
  int b;
  int c;
  int flag;
  int i;
  int p;
  cin>>a>>b;
  c=a+b+2;
  string str;
  for(i=0;i<c;i++){
  cin>>str[i];
  }
  for(p=0;p<c;p++){
    if(p==a){
      if(str[p]=='-'){flag=1;}
    }else{
      if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      flag=1;
      }
    }
  }
  if(flag==0){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                   ^
a.cc:22:35: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                                   ^
a.cc:22:51: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                                                   ^
a.cc:22:67: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                                                                   ^
a.cc:22:83: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                                                                                   ^
a.cc:22:99: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                                                                                                   ^
a.cc:22:115: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                                                                                                                   ^
a.cc:22:131: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                                                                                                                                   ^
a.cc:22:147: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                                                                                                                                                   ^
a.cc:22:163: error: expected primary-expression before '=' token
   22 |       if((str[p]!=='0')&&(str[p]!=='1')&&(str[p]!=='2')&&(str[p]!=='3')&&(str[p]!=='4')&&(str[p]!=='5')&&(str[p]!=='6')&&(str[p]!=='7')&&(str[p]!=='8')&&(str[p]!=='9')){
      |                                                                                                                                                                   ^