Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool check_combinations()
- {
- HashSet<string> groups_hs = new HashSet<string>();
- int number_combinations = 0;
- for (int i = 0; i < this.groups.Count; ++i)
- for (int j = 0; j < i; ++j)
- for (int k = 0; k < j; ++k)
- number_combinations += this.phrases[this.groups[i]].Count * this.phrases[this.groups[j]].Count * this.phrases[this.groups[k]].Count;
- Console.WriteLine("Возможных комбинаций:"+ number_combinations);
- if (number_combinations >= this.number_name)
- return true;
- else
- {
- Console.WriteLine("Возможных комбинаций меньше чем имен");
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement