867A between two offices

  1. #include<iostream>
  2. #include<iostream>
  3. using namespace std;
  4. int main(){
  5. int n;
  6. string s;
  7. cin>>n;
  8. cin>>s;
  9. char b= s[0];
  10. char l = s[n-1];
  11. if(s[0]=='S'&&s[n-1]=='F')
  12. {
  13. cout<<"YES";
  14.  
  15. }
  16. else
  17. cout<<"NO";
  18.  
  19.  
  20. }

Comments

Popular posts from this blog

Codeforce Problem 1703A. YES or YES?

1535A. Fair Playoff

Aptitude test assistant programmer 2018