Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- #include <queue>
- #include <stack>
- #include <map>
- #include <algorithm>
- #include <numeric>
- #include <functional>
- #include <set>
- #include <sstream>
- #include <cstdio>
- #include <cstdlib>
- #include <cstring>
- #include <cmath>
- #include <cctype>
- #include <climits>
- #include <fstream>
- #include <time.h>
- #define ll long long
- #define FOR(i,a,b) for(int i=(a);i<(b);++i)
- #define REP(i,n) FOR(i,0,n)
- #define FOE(i,a) for(auto i : a)
- #define ALL(c) (c).begin(), (c).end()
- #define DUMP(x) cerr << #x << " = " << (x) << endl;
- #define SUM(x) std::accumulate(ALL(x), 0L)
- #define EPS 1e-14
- using namespace std;
- struct ErasingCharacters {
- string s;
- string simulate(string _s) {
- s = _s;
- FOR(i, 1, s.size()) {
- if (s[i - 1] == s[i]) {
- return simulate(s.erase(i - 1, 2));
- }
- }
- return s;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement