BSSPC '21 J2 - James and Youtube

View as PDF

Submit solution


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

Author:
Problem types

James loves to go on Youtube, even during class. He has 1440 minutes in his day, within which he plans to binge N Seraphine jungle guide videos, while also attending M classes. Each class and Youtube video occupies some contiguous sequence of minutes in his time. James can attend multiple classes at once or watch multiple videos at once, but his potato PC cannot run both the meeting app and Youtube app at once.

He asks you to remind him when he is on Youtube during class time. For every Youtube browsing session, output whether or not it would coincide with his class time.

Constraints

1 \le M, N \le 20

1 \le x \le y \le 1440

1 \le a \le b \le 1440

Input Specification

The first line will contain a single integer M, denoting the number of classes he has in a day.

The following M lines contain two space-separated integers x and y, the start and end times of a class. This means that in the minutes in the interval [x,y] he is attending a class.

The next line will contain a single integer N, denoting the number of times he goes on Youtube in a day.

The following N lines will contain two space-separated integers a and b, indicating that he is planning a Youtube browsing session that will occupy the minutes in the interval [a,b].

Output Specification

For each of his Youtube sessions, compute whether or not there is at least one minute within this session that coincides with at least one class.

  • If he isn't going on Youtube during class time, output :eyy:.

  • If he is going on Youtube during class, output Break is Over! Stop playing games! Stop watching Youtube!.

Sample Input 1

3
1 2
3 4
5 6
3
2 5
3 7
9 10

Sample Output 1

Break is Over! Stop playing games! Stop watching Youtube!
Break is Over! Stop playing games! Stop watching Youtube!
:eyy:

Explanation for Sample Output 1

All 3 of James' classes coincide with his first Youtube session. For the second Youtube session, class 2 and 3 are happening while James is watching Youtube. For the last Youtube session, James is not in any class during that time interval.

Sample Input 2

4
525 600
605 680
765 840
845 915
3
450 462
691 710
770 835

Sample Output 2

:eyy:
:eyy:
Break is Over! Stop playing games! Stop watching Youtube!

Comments

There are no comments at the moment.