易企秀怎么做招聘网站超链接,网站自助建站开发制作,东门网,怎么找电商卖自己的产品【题目来源】 https://www.luogu.com.cn/problem/B2124 【题目描述】 输入一个字符串#xff0c;输出该字符串是否回文。回文是指顺读和倒读都一样的字符串。 【输入格式】 输入一行字符串#xff0c;长度小于 100。 【输出格式】 如果字符串是回文#xff0c;输出 yes对字符串 s 进行回文判断。●​​​​​​​ 本题利用栈求解的代码详见https://blog.csdn.net/hnjzsyjyj/article/details/145522672【算法代码一双指针】#include bits/stdc.h using namespace std; int main() { string s; cins; int i0,js.size()-1; while(ij) { if(s[i]s[j]) i,j--; else { coutno; return 0; } } coutyes; return 0; } /* in:abcdedcba out:yes */【算法代码二reverse】#include bits/stdc.h using namespace std; int main() { string s,t; cins; ts; reverse(s.begin(),s.end()); if(st) coutyesendl; else coutnoendl; return 0; } /* in:abcdedcba out:yes */【参考文献】https://blog.csdn.net/hnjzsyjyj/article/details/145522672https://www.ituring.com.cn/book/tupubarticle/29874https://www.luogu.com.cn/problem/solution/B2124https://blog.csdn.net/hnjzsyjyj/article/details/126890655https://www.cnblogs.com/rabbit1103/p/9620373.html