#include <iostream> #include <string> #include <deque> using namespace std; int main() { std::string str; cin >> str; std::string ret; //使用双端队列 std::deque<char> tmp; for(auto it : str){ if(!tmp.empty() && it == tmp.back()){ tmp.pop_back(); } else{ tmp.push_back(...