Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
156968 王顺煜 回文字符串I C++ Accepted 2 MS 272 KB 330 2026-07-12 12:49:25

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { string a; int max,cnt=0; cin>>a; int i = 0; while(a[cnt]!='\0') { cnt++; } while(a[i]!='\0') { if(a[i]!=a[cnt-1-i]) { cout<<"No"; return 0; } if(i>cnt/2){ break; } i++; } cout<<"Yes"; }