Ejemplo n.º 1
0
int main(){
	
	char str[MAX];
	int d = 0, i = 0, n = 0;

	while(1){
		scanf("%d %d", &d, &n);
		
		if(!d && !n)
			break;
		
		scanf("%s", str);
		
		P = 0;
		N = n;
		
		for(i = 0; i < d; i++){
			popUntil(str[i]);
			push(str[i]);
		}
		
		for(i = 0; i < d - n; i++)
			printf("%c", stack[i]);
			
		printf("\n");
	}

	return 0;
}
Ejemplo n.º 2
0
void HTMLElementStack::popUntilPopped(Element* element)
{
    popUntil(element);
    pop();
}