Submit Best Submissions All Submissions

195. The Great Coach, Fegla


Problem Statement:
Ahmed Aly has a great coach, his name is Fegla (also known as Mohamed Abdelwahab). Fegla created a Facebook group for his trainees, and he wrote the following description for the group: "Only for members who trained one day for ACM-ICPC in my house".

Ahmed found this description ambiguous, because it might mean "exactly one day" or "at least one day". But sometimes both statements will be true for the same set of trainees, and in that case it doesn't matter to say "one day", "exactly one day" or "at least one day", because all of them will be true for the same set of trainees.

Given how many days each trainee trained in Fegla's house, find out if the 3 statements will be true for the same set of people or not.


Input Format:
Your program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 <= T <= 100). Followed by the test cases, each test case starts with a line containing one integer N (1 <= N <= 100) representing the number of trainees, followed by a line which contains N non-negative integers separated by a single space, representing how many days each trainee trained in Fegla's house. Each trainee trained at most 100 days in Fegla's house.


Output Format:
For each test case, print a single line which will be "ambiguous" if it will be ambiguous to just say "one day" (if the above 3 statements will be true for different sets of trainees), or "not ambiguous" otherwise.


Sample Input:
3 3 1 2 3 1 2 1 1


Sample Output:
ambiguous ambiguous not ambiguous





Added by: ahmed_aly
Added at: 2014-08-09 14:00:03 UTC
Time Limit: 1 second
Partial score: No
Source:A2OJ FCI-CU Tournament 2014 - Qualification Round