알고리즘

[알고리즘] 백준 13235 - 팰린드롬 (C++)

blueberrysoda 2025. 4. 5. 23:07

[문제 링크] : https://www.acmicpc.net/problem/13235

#include <iostream>
#include <algorithm>
using namespace std;

string A, B;

int main(){
    cin >> A;
    B = A;
    reverse(B.begin(), B.end());

    if(A == B){
        cout << "true\n";
    }
    else{
        cout << "false\n";
    }
    return 0;
}