Created
April 3, 2016 16:27
-
-
Save joaogui1/dea20ee366c621a99f20d4fd45bf21d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
using namespace std; | |
int main() { | |
char ant, S[35]; | |
int n; | |
scanf("%d", &n); | |
while(n--) { | |
ant = 'A'; | |
scanf(" %[^\n]", S); | |
for(int i = 0; S[i] != '\0'; i++) { | |
if(S[i] != ant) { | |
printf("%c", S[i]); | |
ant = S[i]; | |
} | |
} | |
printf("\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment