Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
121308 范恒恺 回文字符串I C++ Compile Error 0 MS 0 KB 271 2025-06-07 11:23:45

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 for(int i=0;i<=s.length()/2;i++){
              ^
Main.cc: At global scope:
Main.cc:25:2: error: expected unqualified-id before 'return'
  return 0;
  ^
Main.cc:26:1: error: expected declaration before '}' token
 }
 ^