Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <iostream>
- #include <string>
- #include <vector>
- #include <map>
- #include <queue>
- #include <algorithm>
- #include <cmath>
- #include <set>
- #include <cstdio>
- #include <bitset>
- #include <list>
- #include <iterator>
- #include <time.h>
- #include <deque>
- #pragma GCC optimize("Ofast")
- //#pragma GCC optimize("no-stack-protector")
- #pragma GCC optimize("unroll-loops")
- //#pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native")
- //#pragma GCC optimize("fast-math")
- using namespace std;
- typedef long long ll;
- typedef long double ld;
- #define int long long
- const int inf = 1e9 + 7;
- const ll INF = 4 * (ll)1e18 + 7;
- const ld eps = 1e-9;
- const ll mod = 1e9 + 7;
- int f(int x)
- {
- return 3 * (x * x - 16) * (x * x - 16) + 5;
- }
- signed main()
- {
- #ifdef LOCAL
- freopen("output.txt", "w", stdout);
- freopen("input.txt", "r", stdin);
- #endif
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- string word;
- cin >> word;
- string symbols;
- char last = '#';
- for (char ch : word)
- {
- if (ch != last)
- symbols += ch;
- else
- symbols.pop_back();
- last = ch;
- }
- cout << symbols << endl;
- //system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement