| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 77836 | sh25_wangtaojie | 判断字符串是否为回文 | C++ | 通过 | 0 MS | 244 KB | 497 | 2025-12-26 14:52:56 |
#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; }