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:20: warning: extra tokens at end of #include directive
    1 | #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"); }
      |                    ^~~
a.cc:1:116: error: extended character ’ is not valid in an identifier
    1 | #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"); }
      |                                                                                                                    ^
a.cc:1:116: error: extended character ’ is not valid in an identifier
a.cc:1:133: error: extended character ’ is not valid in an identifier
    1 | #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"); }
      |                                                                                                                                     ^
a.cc:1:133: error: extended character ’ is not valid in an identifier
a.cc:1:174: error: extended character ’ is not valid in an identifier
    1 | #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"); }
      |                                                                                                                                                                              ^
a.cc:1:176: error: extended character ’ is not valid in an identifier
    1 | #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"); }
      |                                                                                                                                                                                ^
a.cc:1:235: error: extended character ’ is not valid in an identifier
    1 | #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"); }
      |                                                                                                                                                                                                                                           ^
a.cc:1:235: error: extended character ’ is not valid in an identifier
a.cc:1:252: error: extended character ’ is not valid in an identifier
    1 | #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"); }
      |                                                                                                                                                                                                                                                            ^
a.cc:1:252: error: extended character ’ is not valid in an identifier
a.cc:1:10: fatal error: cstdio : No such file or directory
    1 | #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"); }
      |          ^~~~~~~~~
compilation terminated.