fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main() {
  4. int x,y;
  5. cin>>x>>y;
  6. string s;
  7. cin>>s;
  8. if (s[x] =='-' && s.length() == x+y+1) cout<<"Yes";
  9. else cout<<"No";
  10. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
No