So, I need to find unique quadruples in C++. Any idea would help
Input 1 : [1, 0, 2, 3], [2, 0, 1, 3], [4, 5, 6, 7], [8, 9, 10, 11]
Output 1 : [2, 0, 1, 3], [4, 5, 6, ,7], [8, 9, 10, 11]
As [1,0,2,3] and [2,0,1,3] both contain same elements so either one can be in the output
Input 2 : [2, 0, 1, 3], [4, 5, 6, ,7], [8, 9, 10, 11], [15,16,17,18]
Output 2 : [2, 0, 1, 3], [4, 5, 6, ,7], [8, 9, 10, 11], [15,16,17,18]
I cannot initalize set (int,int,int,int). Any idea on how to get unique ones?
Update for people who asked for defining the question more: A quadruple is a combination of 4 integers for the problem. Problem states to find unique quadruples from all the given quadruples. A quadruple (a,b,c,d) is unique , if no other quadruple exists with all the elements same as this one, i.e. any quadruple formed from the permutation of (a,b,c,d) is not unique. Quadruples (a,b,c,d) and (a,d,b,c) are the same, where as quadruples (a,b,c,d) and (a,e,f,b) are not. Quadruples are unique if they contain atleast 1 element which is not common to both.