The first Test point WA, help!!!
Attached question address:Your text to link here...
#include<bits/stdc++.h>
using namespace std;
int n,flag;
string s;
int main(){
cin>>n;
while(n--){
cin>>s;
for(int i=0;i<s.size();i++){
if(s[i]!=s[i-1]&&flag>0){
cout<<s[i];
flag=0;
}
else{
flag++;
}
}
cout<<endl;
}
return 0;
}