Help Mrinmay
Practice
5 (1 votes)
Easy
Problem
77% Success 227 Attempts 20 Points 0.5s Time Limit 256MB Memory 1024 KB Max Code

Two good friends Mrinmay and Anup are fighting for the same girl. The girl being sapiosexual gave them a task to accomplish. The person who accomplishes the task goes out with her.Mrinmay, tired of being a "Sakht Launda", doesn't want to lose her to "Stud Launda" Anup. Help Mrinmay to complete the task.
INPUT
First line contains a String Str
Second line contains number of Queries N
Each of the next N lines contains a string query.

NOTE: All characters of the all strings are lowercase.

Task: For each query, determine whether the string can be formed using the characters of the original string

OUTPUT
For each query ,Print "YES" if the query string can be formed from the letters of String Str else Print "NO"

CONSTRAINTS
0 < length of string < 100
0 < number of queries< 10^5
0 <length of query string< 100

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
10 votes
Tags:
StringImplementationRecruitBasic ProgrammingAlgorithmsEasyString AlgorithmsApprovedHashing algorithmHashing algorithm
Points:20
7 votes
Tags:
Hash functionEasyStringHashing algorithm
Points:20
13 votes
Tags:
String AlgorithmsHashing AlgorithmAlgorithms