Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define fast()(ios_base::sync_with_stdio(0),cin.tie(NULL));
- int main()
- {
- fast()
- int t;
- cin>>t;
- while(t--)
- {
- string s,sub;
- cin>>s;
- sub.push_back(s[0]);
- bool f=true;
- for(int i=1;i<s.size()-1;i++)
- {
- if(f)
- {
- sub.push_back(s[i]);
- f= false;
- }
- else f=true;
- }
- sub.push_back(s[s.size()-1]);
- cout<<sub<<endl;
- }
- }
Add Comment
Please, Sign In to add comment