-sb subexpressions now go in the order of length (took some linq)
commit423df6b9644cf0b2ca238f165916407adcf00268
authorIlya Gulkov <isgulkov@edu.hse.ru>
dateMon 12 Oct 2015, 02:02 (11 years ago)
parent2778dda
SolveAvdoshin/BooleanFunctions.cs+2−1
@@ -1,5 +1,6 @@
11using System;
22using System.Collections.Generic;
3+using System.Linq;
34
45namespace SolveAvdoshin
56{
@@ -107,7 +108,7 @@ namespace SolveAvdoshin
107108 Console.WriteLine("\tСколько операций, столько и блоков");
108109 }
109110 else {
110− foreach(string s in new HashSet<string>(ex.GetSetOfAllBlockStrings())) {
111+ foreach(string s in new HashSet<string>(ex.GetSetOfAllBlockStrings()).OrderByDescending(x => x.Length).Skip(1)) {
111112 if(s != ex.ToString()) {
112113 Console.WriteLine("\t" + s);
113114 }