Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Noman's Birthday

By nurshuvo51 · Limits 1s, 512 MB

Today is our friend Noman’s birthday. For celebration of his birthday, we have already used n baloons to decorate the walls of the party room. These baloons are of two colors- red and green. After sometime, we came to know that Noman liked baloons arranged in such a manner that no adjacent two baloons have the same color.

So, we decided that if our arrangement does not match with Noman’s choice, we will change it. We want to make Noman happy tomorrow.

The arrangement of n baloons is represented as a sequence of ‘0’ and ‘1’, where ‘0’ represents red color and ‘1’ represents green color. For example, if n = 5 and the sequence is “01101” it implies that first and fourth baloons are colored with red and others are colored with green.

Your task is to say if the sequence of baloons matches with Noman’s choice or not.

Input

The first line consists of an integer n(1<=n<=100), the number of baloons. The next line represents the arrangement of n ballons as a sequence where a ‘0’ means red baloon and a ‘1’ means green baloon.

Output

If the sequence of baloons matches with Noman’s choice then print the line “No change needed” else print “Change needed” (without quotation).

Samples

InputOutput
5
01101

Change needed
InputOutput
5
01010

No change needed

    Discussion

    Statistics


    98% Solution Ratio

    dip_BRUREarliest, 4w ago

    dip_BRURFastest, 0.0s

    SAIF_IITLightest, 0 B

    mdgaziur001Shortest, 88B

    Submit

    Login to submit

    Related Contests

    NSTU ICE Fest Regional Programming Contest 2020 Ended at 2020-01-24 07:15:00 +0000 UTC
    Mirror of NSTU ICE Fest Regional Programming Contest 2020 Ended at 2020-01-24 08:15:00 +0000 UTC