| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 78117 | sh25_wanghy | 判断字符串是否为回文 | C++ | Accepted | 0 MS | 256 KB | 497 | 2025-12-26 15:23:18 |
#include <iostream> #include <string> using namespace std; bool isPalindrome(const string& str) { int left = 0; int right = str.length() - 1; while (left < right) { if (str[left] != str[right]) { return false; } left++; right--; } return true; } int main() { string input; cin >> input; if (isPalindrome(input)) { cout << "yes"; } else { cout << "no"; } return 0; }