406582: GYM102448 A Accept or Reject

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Accept or Rejecttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

This semester, various UFPE competitors had classes of a discipline called Theoretical Informatics. One of the major studied concepts was Turing Machines (TM).

A TM is basically a system that has a tape with infinite memory cells to the right and a head pointer that is always pointing to one cell at a given moment.

A known fact in computer science is that every algorithm has an equivalent TM.

There are many TM variations and some of them has capability differences. One of these variations are the Deciders, which are machines that always stops (never entering infinite loop state), "accepting" or "rejecting" any given input.

One of the recommended exercises of the discipline was the following: "Describe a Decider that accepts a given input string of size $$$N$$$ if it has an $$$M$$$ sized palindrome as substring and reject if not".

Your task here is to solve this exercise, but as we do not have compilers that can interpret TM descriptions, you instead has to code an equivalent algorithm to solve it.

Input

The input will contain only one test set. You will receive two integers N and M ($$$1 \le M \le N \le 5 \cdot 10^{5}$$$), as described above, followed by a line with a string $$$S$$$ of size $$$N$$$. It is guaranteed that $$$S$$$ contains only lowercase english letters.

Output

The output must contain only one line with "Accept" (without quotes) if your Decider accepts the input or "Reject" (without quotes) if it doesn't.

You may print every letter in any case you want (so, for example, the strings Accept, accept, ACcept and accEpT will all be recognized as a positive answer).

ExampleInput
10 4
ajabbaaksj
Output
Accept

加入题单

上一题 下一题 算法标签: