Algorithm/백준
C++ 알고리즘 - 백준 33985 그거 왜 말해!
마루설아
2025. 5. 26. 14:56
https://www.acmicpc.net/problem/33985
#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
/******** 전역변수 ********/
/******** 함 수 ********/
int main(void) {
/******** C++ INIT ********/
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
/******** 지역변수 ********/
int size;
string str;
/******** 구 현 ********/
cin >> size;
cin >> str;
// 사이즈와 상관없이 첫 글자가 A, 끝 글자가 B라면 만들 수 있다.
if (str.front() == 'A' && str.back() == 'B') cout << "Yes";
else cout << "No";
}