코딩테스트 공부 2025 Start1 10988) 팰린드롬인지 확인하기 (reverse, 투포인터) 출처 https://www.acmicpc.net/problem/10988 내 풀이 Reverse더보기#include #include using namespace std; string A, B = ""; int main() { cin >> B; A = B; reverse(B.begin(), B.end()); if (A == B) cout else cout }투포인터 더보기#include #include using namespace std; // 투포인터 방식 int main() { string str; cin >> str; int left = 0; int right = str.size() - 1; while(left { if (str[left] != str[right]) { cout return 0;.. 2025. 3. 30. 이전 1 다음