文章
221
粉丝
0
获赞
64
访问
8.1k
//栈
#include<stdio.h>
#include<stack>
#include<string.h>
using namespace std;
int main()
{
char s[110];
scanf("%s",s);
int l=strlen(s);
stack<char> hash;
for(int i=0;i<l;i++)
{
hash.push(s[i]);
if(hash.size()>=3)
{
char top1=hash.top();
hash.pop();
char top2=hash.top();
hash.pop();
char top3=hash.top();
hash.pop();
&nbs...
登录后发布评论
暂无评论,来抢沙发