View Code of Problem 3924

#include<iostream>
#include<string>
#include<algorithm>
#include<stack>

using namespace std;

int main() {
	char input, c = '0';
	while ((input = getchar()) != EOF)  //不能用cin,超时
	{
		if (input != c)
		{
			cout << input;
			c = input;
		}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3924