LCC/Moose '19 Contest 5 J1 - Catastrophic Charger

View as PDF

Submit solution

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

Author:
Problem type

Everyone has trouble plugging in things into their computers, especially USB's. However, in this case, Alice has a charger that can only be plugged in a specific way. Her charger can only be plugged in in one direction, or else in any other case it will say that the computer is not charging. Given the degrees that the charger needs to be plugged in to charge, and N different degrees that Alice wants to plug her charger in, determine for each degree if her laptop is able to charge or not. If the degree that Alice wants her charger to be plugged in ends up at the same position as the original angle, then we consider that her laptop is able to charge (even though her charger may break).

Input Specification

The first line will contain N (1 \leq N \leq 100), the number of different ways that Alice wants to plug in her laptop charger into her laptop, as well as M (1 \leq M \leq 360), the specific degrees that the charger has to be plugged in to charge. The next N lines will contain an integer X (0 \leq X \leq 1800), the degree that Alice wants her laptop to be plugged into.

Output Specification

N lines, either Charging or Not Charging, if Alice's laptop is charging or not.

Sample Input 1

3 50
50
30
410

Sample Output 1

Charging
Not Charging
Charging

Comments

There are no comments at the moment.