C. Paint the Array
You are given an array
The coloring is called beautiful if there are no pairs of adjacent elements with the same color in the array. Your task is to find any value of
The first line contains a single integer
The first line of each testcase contains one integer
The second line of each testcase contains
For each testcase print a single integer. If there is no such value of
5 5 1 2 3 4 5 3 10 5 15 3 100 10 200 10 9 8 2 6 6 2 8 6 5 4 2 1 3
2 0 100 0 3
0 Comments
If you have any doubts/suggestion/any query or want to improve this article, you can comment down below and let me know. Will reply to you soon.