Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146256 李折曦 回文字符串I C++ Compile Error 0 MS 0 KB 349 2026-01-27 14:41:57

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main (){ #include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int len = s.size(); bool fiag=true; for(int i=0;i<len/2;++i){ if(s[i]!=s[len-i-1]){ fiag=0; break; } } if(fiag)cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:11: error: a function-definition is not allowed here before '{' token
 int main(){ 
           ^
Main.cc:21:1: error: expected '}' at end of input
 }
 ^