Attendance

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M
PyPy 3 256M

Author:
Problem types

Mr. Benum is taking the attendance of his computer science class. In his class, there are N students. The office will want to know who is present and who is not. Help Mr. Benum create a program to tell the office if someone showed up to class.

Input Specification

The first line contains N (1 \le N \le 50\,000), representing the number of students in the class. The next N lines contains either yes or no representing whether or not somebody showed up to class, in the order on which they appear on the attendance. The next line contains K (1 \le K \le 50\,000), representing the number of queries the office wants to make. The next K lines contain the student to query as the number in which they appear on the attendance, starting at 1.

Output Specification

For each query, output on a new line here if that student is present or not here if they are not.

Sample input

3
yes
yes
no
4
1
1
3
2

Sample Output

here
here
not here
here

Comments

There are no comments at the moment.