Problem:-
You are given an array of integers. The special property of the array is that exactly two different elements occur once while other elements occur twice.
You are required to determine those two elements.
Input format
Print two space-separated integers that occur once in the array in ascending order.
Constraints
, where denotes the element in the array
You are required to determine those two elements.
Input format
- First line: Integer denoting the number of elements in the array
- Second line: space-separated integers denoting the values in the array
Print two space-separated integers that occur once in the array in ascending order.
Constraints
, where denotes the element in the array
Explanation
The numbers other than 1 and 2 occur twice, hence, the answer is 1 and 2.
Time Limit:1.0 sec(s) for each input file.
Memory Limit:256 MB
Source Limit:1024 KB
0 Comments