using System.Collections.Generic;
static string[] PGs = { "song", "roy", "wei", "dazzle", "trista", "tony" };
static string[] SAs = { "helen", "sandra" ,"lihuei"};
static string[] QAs = { "candy" };
public static void Main(string[] args)
string[] All = PGs.Concat(SAs).Concat(QAs).ToArray();
List<string> Positive = new List<string>();
List<string> Negative = new List<string>();
if (RandomMember(All, ref Positive, ref Negative))
foreach (var item in Positive)
foreach (var item in Negative)
Console.WriteLine(posResult);
Console.WriteLine(negResult);
public static bool RandomMember(string[] allMembers , ref List<string> positive, ref List<string> negative)
Random ran = new Random();
positive = new List<string>();
negative = new List<string>();
foreach (string s in allMembers)
if (positive.Intersect(PGs).Count() > 0 && positive.Intersect(SAs).Count() > 0
&& negative.Intersect(PGs).Count() > 0 && negative.Intersect(SAs).Count() > 0
&& negative.Count()== positive.Count())