git.iko.soy/ikoHSE/SolveAvdoshin
on master help sign in
-sb subexpressions now go in the order of length (took some linq)
423df6bIlya Gulkov
SolveAvdoshin/BooleanFunctions.cs+2−1
@@ -1,5 +1,6 @@
1using System;
1using System;
2using System.Collections.Generic;
2using System.Collections.Generic;
3+using System.Linq;
3
4
4namespace SolveAvdoshin
5namespace SolveAvdoshin
5{
6{
@@ -107,7 +108,7 @@ namespace SolveAvdoshin
107 Console.WriteLine("\tСколько операций, столько и блоков");
108 Console.WriteLine("\tСколько операций, столько и блоков");
108 }
109 }
109 else {
110 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)) {
111 if(s != ex.ToString()) {
112 if(s != ex.ToString()) {
112 Console.WriteLine("\t" + s);
113 Console.WriteLine("\t" + s);
113 }
114 }