| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 41616 | jiabokai | 判断字符串是否为回文 | C++ | Accepted | 0 MS | 252 KB | 303 | 2024-02-22 08:36:14 |
#include<bits/stdc++.h> using namespace std; bool palindrome(string s){ int i=0,j=s.size()-1; while(i<=j){ if(s[i]==s[j]){ i++; j--; }else return false; } return true; } int main() { string s; cin>>s; if(palindrome(s)){ cout<<"yes"; }else cout<<"no"; return 0; }