Rated Contest 1 P3 - Trap-ezoid

View as PDF

Submit solution

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

Author:
Problem type

Following a busy morning of problem-solving and studying, Max tiredly sits down for his afternoon physics class. However, having finished all his physics homework this morning, he is quickly bored, and instead of paying attention to the lesson, he instead challenges his friend, Annie, to a game.

Only one piece of terminology is required to play this game:

A square is considered trapped if it is adjacent to at least two other squares with a piece on it.

He hands Annie an N \times N board, as well as M pieces to place anywhere on the board she wishes. After placing all the pieces on the board, Annie will then place a piece on every empty square that is considered trapped. She repeats this until no more squares are trapped or until the board is completely filled.

Annie wins if the board is completely filled, and Max wins otherwise. Given N and M, can you determine if Annie can win?

Constraints

1 \le N \le 10^9

1 \le M \le N \times N

Input Specification

The first and only line of input contains two integers, N and M.

Output Specification

Output Rare Annie W if Annie can win, otherwise output Common Annie L.

Sample Input

4 5

Sample Output

Rare Annie W

Sample Explanation

One possible initial configuration of the board that will result in Annie winning would be the following, where an x denotes a square with a piece, and an . is an empty square.

x.x.
..x.
..x.
...x

Comments


  • 0
    htoshiro  commented on March 3, 2024, 1:20 a.m.

    goofy question