← 返回 amazon 的题目列表Keyword List Membership Check
类型:online_judge
Given a list of keywords and a currently processed string query, determine whether query exactly matches any keyword in the list.
Input Format
First line: integer n, the number of keywords.
Next n lines: one keyword per line.
Final line: the string query.
Output Format
Print true if query is present in the keyword list; otherwise print false.
Constraints
1 <= n <= 2 * 10^5
Each string has length from 1 to 100.
Strings contain printable non-whitespace characters.
Example
Input:
3
amazon
aws
prime
aws
Output:
true
Example
Input
3
amazon
aws
prime
aws
Output
true