시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
5 초 128 MB 169 49 30 25.862%

문제

이 문제를 지루하게 만들지 않기 위해 짧게 쓰자면,

'지루하지 않은 수열'은 모든 연결된 부분수열들이 해당 부분수열의 어떤 원소도 같은 값을 가지지 않는 원소를 포함하는 수열이다.

주어진 수열에 대해 '지루하지 않은 수열'인지 여부를 알아내자.

입력

입력의 첫번째 줄에는 테스트 케이스의 개수 T가 주어지며, 각 테스트 케이스에 주어지는 입력은 다음고 같다.

첫째줄에 수열의 길이 n (1 ≤ n ≤ 200 000) 이 주어진다.

둘째줄에 수열의 n개의 원소가 공백으로 구분되어 주어진다.

각 원소는 음수가 아닌 정수이며 109 보다 작다.

출력

각 테스트 케이스의 정답을 입력에 주어진 순서대로 출력한다.

정답은 non-boring 또는 boring을 한 줄에 출력한다.

예제 입력 1

4
5
1 2 3 4 5
5
1 1 1 1 1
5
1 2 3 2 1
5
1 1 2 1 1

예제 출력 1

non-boring
boring
non-boring
boring
W3sicHJvYmxlbV9pZCI6IjM0MDgiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM5YzBcdWI4ZThcdWQ1NThcdWM5YzAgXHVjNTRhXHVjNzQwIFx1YzIxOFx1YzVmNCIsImRlc2NyaXB0aW9uIjoiPHA+XHVjNzc0IFx1YmIzOFx1YzgxY1x1Yjk3YyBcdWM5YzBcdWI4ZThcdWQ1NThcdWFjOGMgXHViOWNjXHViNGU0XHVjOWMwIFx1YzU0YVx1YWUzMCBcdWM3MDRcdWQ1NzQgXHVjOWU3XHVhYzhjIFx1YzRmMFx1Yzc5MFx1YmE3NCw8XC9wPlxyXG5cclxuPHA+JiMzOTtcdWM5YzBcdWI4ZThcdWQ1NThcdWM5YzAgXHVjNTRhXHVjNzQwIFx1YzIxOFx1YzVmNCYjMzk7XHVjNzQwIFx1YmFhOFx1YjRlMCBcdWM1ZjBcdWFjYjBcdWI0MWMgXHViZDgwXHViZDg0XHVjMjE4XHVjNWY0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