1028 - All in All 1028 - Considerándolo todo 1028 - All in All

Statistics Sub: 8830 | AC: 2574 | AC%: 29,15 | Score: 0,09
Created by ULM Local Contest
Added by cjoa (2011-10-13)
Limits
Total Time: 2000 MS |Memory: 62 MB | Output: 64 MB | Size: 14 KB
Enabled languages
Available in

Description

You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss in detail how the strings are generated and inserted into the original message. To validate your method, however, it is necessary to write a program that checks if the message is really encoded in the final string. Given two strings s and t, you have to decide whether s is a subsequence of t; i.e. if you can remove characters from t such that the concatenation of the remaining characters is s.
;jsessionid=39DD524E08420353800891E026C115A3
Has ideado una nueva técnica de encriptación que codifica un mensaje insertando entre sus caracteres cadenas generadas aleatoriamente de una manera inteligente. Debido a problemas de patentes pendientes, no discutiremos en detalle cómo se generan las cadenas y cómo se insertan en el mensaje original. Sin embargo, para validar tu método, es necesario escribir un programa que verifique si el mensaje realmente está codificado en la cadena final. Dadas dos cadenas s y t, debes decidir si s es una subsecuencia de t; es decir, si puedes eliminar caracteres de t tales que la concatenación de los caracteres restantes sea s.
;jsessionid=39DD524E08420353800891E026C115A3
You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss in detail how the strings are generated and inserted into the original message. To validate your method, however, it is necessary to write a program that checks if the message is really encoded in the final string. Given two strings s and t, you have to decide whether s is a subsequence of t; i.e. if you can remove characters from t such that the concatenation of the remaining characters is s.
;jsessionid=39DD524E08420353800891E026C115A3

Input specification

The input contains multiple test cases (no more than 20). Each is specified by two strings (of at most 30 characters) s, t of alphanumeric ASCII characters separated by white-space. Input is terminated by EOF.
La entrada contiene múltiples casos de prueba (no más de 20). Cada uno está compuesto por dos cadenas (de como máximo 30 caracteres) s y t de caracteres alfanuméricos ASCII separadas por un espacio en blanco. La entrada es terminada por el EOF.;jsessionid=39DD524E08420353800891E026C115A3
The input contains multiple test cases (no more than 20). Each is specified by two strings (of at most 30 characters) s, t of alphanumeric ASCII characters separated by white-space. Input is terminated by EOF.

Output specification

For each test case output, if s is a subsequence of t.
Para cada caso de prueba diga si s es una subsecuencia de t.
The input contains multiple test cases (no more than 20). Each is specified by two strings (of at most 30 characters) s, t of alphanumeric ASCII characters separated by white-space. Input is terminated by EOF.

Sample input

sequence subsequence
person compression
VERDI vivaVittorioEmanueleReDiItalia
caseDoesMatter CaseDoesMatter

Sample output

Yes
No
Yes
No

Hint(s)

http://coj.uci.cu/24h/
http://coj.uci.cu/24h/

Recommendation

We have carefully selected several similar problems: 1000 | 1049 | 1494 | 3599 | 1960 | 3147