Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
            ∧_∧
      ∧_∧  (´<_` )  Welcome to My Coding Space!
     ( ´_ゝ`) /  ⌒i @hamayanhamayan
    /   \    | |
    /   / ̄ ̄ ̄ ̄/  |
  __(__ニつ/  _/ .| .|____
     \/____/ (u ⊃
---------------------------------------------------------------------------------------------------*/
//---------------------------------------------------------------------------------------------------
void _main() {
string s;
rep(i, 0, 19) {
getline(cin, s);
int idx = 0;
while (idx + 2 < s.size()) {
if (s[idx] == '%' and s[idx + 2] == '%') {
s = s.substr(0, idx) + s.substr(idx + 3);
}
else idx++;
}
cout << s << endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.