WA...
查看原帖
WA...
135085
RebeccaJ楼主2020/5/30 22:31
#include<cstdio>
#include<cstring>
#include <cstdlib>
#include<algorithm>
#include <vector>
#include <set>
#include <string>
#include <map>
#include <iostream>
#include <stack>
#include <list>

using namespace std;

int main(){
	list<char> text;
	list<char>::iterator it = text.begin();
	char ch;
	while((ch = getchar()) != EOF){
		if(ch =='['){
			it = text.begin();
		}else if(ch == ']'){
			it = text.end();
		}else{
			it = text.insert(it,ch);
			it++;
		}
	}
	for(it = text.begin(); it != text.end(); it++){
		printf("%c",*it);
	}
	printf("\n");
	
}

求问求问,一直WA┭┮﹏┭┮

2020/5/30 22:31
加载中...