| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 159166 | 余建成 | 31回文字符串 | C++ | Compile Error | 0 MS | 0 KB | 227 | 2026-08-26 13:30:28 |
#include<iostream> using namespace std; int main(){ string a; cin>>a; int x=a.size; for(int i=0;i<x/2;i++){ if(a[i]!=a[x-1-i]){ cout<<"No"<<endl; return 0; } } cout<<"Yes"<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:6:10: error: cannot convert 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size, std::allocator >' from type 'std::__cxx11::basic_string::size_type (std::__cxx11::basic_string::)() const noexcept {aka long unsigned int (std::__cxx11::basic_string::)() const noexcept}' to type 'int'
int x=a.size;
^