// Copyright © 2021 ์์ฃผํ. All rights reserved.
//
// https://www.acmicpc.net/problem/10174
// BOJ10174 ํฐ๋ฆฐ๋๋กฌ
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int N; cin >> N;
cin.ignore();
while (N--) {
string s;
getline(cin, s);
transform(s.begin(), s.end(), s.begin(), ::tolower);
int start = 0;
int end = s.length() - 1;
bool flag = true;
while (start <= end) {
if (s[start] != s[end]) flag = false;
start++;
end--;
}
if (flag) cout << "Yes"<<"\n";
else cout << "No"<<"\n";
}
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 10451๋ฒ - ์์ด ์ฌ์ดํด (0) | 2021.10.16 |
---|---|
[๋ฐฑ์ค,c++] 1032๋ฒ - ๋ช ๋ น ํ๋กฌํํธ (0) | 2021.10.16 |
[๋ฐฑ์ค,c++] 1026๋ฒ - ๋ณด๋ฌผ (0) | 2021.10.16 |
[๋ฐฑ์ค,c++] 10159๋ฒ - ์ ์ธ (0) | 2021.10.16 |
[๋ฐฑ์ค,c++] 1015๋ฒ - ์์ด ์ ๋ ฌ (0) | 2021.10.16 |
[๋ฐฑ์ค,c++] 1012๋ฒ - ์ ๊ธฐ๋ ๋ฐฐ์ถ (0) | 2021.10.16 |
๋๊ธ