Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135757 田祥江 31回文字符串 C++ Compile Error 0 MS 0 KB 358 2025-11-08 13:11:23

Tests(0/0):


Code:

#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:5: error: expected ',' or ';' before 'bool'
     bool fiag=true; 
     ^
Main.cc:10:15: error: 'fiag' was not declared in this scope
               fiag=0; 
               ^
Main.cc:15:9: error: 'fiag' was not declared in this scope
      if(fiag)cout<<"Yes"<