namespace  { using System; using System.Collections; using System.Reflection; using System.Runtime.CompilerServices; internal class Ÿ : IList, IEnumerable, ICollection, ICloneable { private ArrayList ; private IComparer ; private bool ; private bool ; public void (int Index, ICollection C) { throw new InvalidOperationException("Insert cannot be called on a Heap."); } public void (object Value, int NumberToKeep) { if (Value == null) { throw new ArgumentNullException("Value"); } int start = 0; while ((start = this.IndexOf(Value, start)) >= 0) { if (NumberToKeep <= 0) { this..RemoveAt(start); } else { start++; NumberToKeep--; } if (this..Compare(this.[start], Value) > 0) { break; } } } public void () { int index = 0; while (index < (this.Count - 1)) { if (this..Compare(this[index], this[index + 1]) == 0) { this.RemoveAt(index); } else { index++; } } } public int () { int num = -1; if (this..Count > 0) { num = 0; object obj2 = this.[0]; } return num; } public int () { int num = -1; if (this..Count > 0) { num = this..Count - 1; object obj2 = this.[this..Count - 1]; } return num; } public object ‰() { if (this..Count == 0) { throw new InvalidOperationException("The heap is empty."); } object obj2 = this.[this.Count - 1]; this..RemoveAt(this.Count - 1); return obj2; } public int Š(object Object) { return this.Add(Object); } private bool ‹(object Object) { if (!(!this. || (Object is IComparable))) { throw new ArgumentException("The Heap is set to use the IComparable interface of objects, and the object to add does not implement the IComparable interface."); } if (!(this. || !this.Contains(Object))) { return false; } return true; } private void Œ(IComparer Comparer, int Capacity) { if (Comparer != null) { this. = Comparer; this. = false; } else { this. = new (); this. = true; } this. = (Capacity > 0) ? new ArrayList(Capacity) : new ArrayList(); this. = true; } public Ÿ() { this. = null; this.Œ(null, 0); } public Ÿ(IComparer Comparer) { this. = null; this.Œ(Comparer, 0); } public Ÿ(int Capacity) { this. = null; this.Œ(null, Capacity); } public Ÿ(IComparer Comparer, int Capacity) { this. = null; this.Œ(Comparer, Capacity); } public int Add(object O) { int num = -1; if (!this.‹(O)) { return num; } int index = this.IndexOf(O); int num3 = (index >= 0) ? index : (-index - 1); if (num3 >= this.Count) { this..Add(O); } else { this..Insert(num3, O); } return num3; } public void AddRange(ICollection C) { foreach (object obj2 in C) { this.Add(obj2); } } public void Clear() { this..Clear(); } public object Clone() { Ÿ Ÿ = new Ÿ(this., this..Capacity); Ÿ. = (ArrayList) this..Clone(); Ÿ. = this.; return Ÿ; } public bool Contains(object O) { return (this..BinarySearch(O, this.) >= 0); } public void CopyTo(Array array, int arrayIndex) { this..CopyTo(array, arrayIndex); } public override bool Equals(object Object) { Ÿ Ÿ = (Ÿ) Object; if (Ÿ.Count != this.Count) { return false; } for (int i = 0; i < this.Count; i++) { if (!Ÿ[i].Equals(this[i])) { return false; } } return true; } public IEnumerator GetEnumerator() { return this..GetEnumerator(); } public override int GetHashCode() { return this..GetHashCode(); } public int IndexOf(object O) { int num = -1; num = this..BinarySearch(O, this.); while ((num > 0) && this.[num - 1].Equals(O)) { num--; } return num; } public int IndexOf(object Object,  AreEqual) { for (int i = 0; i < this..Count; i++) { if (AreEqual(this.[i], Object)) { return i; } } return -1; } public int IndexOf(object Object, int Start) { int num = -1; num = this..BinarySearch(Start, this..Count - Start, Object, this.); while ((num > Start) && this.[num - 1].Equals(Object)) { num--; } return num; } public int IndexOf(object Object, int Start,  AreEqual) { if ((Start < 0) || (Start >= this..Count)) { throw new ArgumentException("Start index must belong to [0; Count-1]."); } for (int i = Start; i < this..Count; i++) { if (AreEqual(this.[i], Object)) { return i; } } return -1; } public void Insert(int Index, object O) { throw new InvalidOperationException("Insert method cannot be called on a Heap."); } public void Remove(object Value) { this..Remove(Value); } public void RemoveAt(int Index) { this..RemoveAt(Index); } public override string ToString() { string str = "{"; for (int i = 0; i < this..Count; i++) { str = str + this.[i].ToString() + ((i != (this..Count - 1)) ? "; " : "}"); } return str; } public bool AddDuplicates { get { return this.; } set { this. = value; } } public int Capacity { get { return this..Capacity; } set { this..Capacity = value; } } public int Count { get { return this..Count; } } public bool IsFixedSize { get { return this..IsFixedSize; } } public bool IsReadOnly { get { return this..IsReadOnly; } } public bool IsSynchronized { get { return this..IsSynchronized; } } public object this[int Index] { get { if ((Index >= this..Count) || (Index < 0)) { throw new ArgumentOutOfRangeException("Index is less than zero or Index is greater than Count."); } return this.[Index]; } set { throw new InvalidOperationException("[] operator cannot be used to set a value in a Heap."); } } public object SyncRoot { get { return this..SyncRoot; } } private class  : IComparer { public int Compare(object Object1, object Object2) { IComparable comparable = Object1 as IComparable; return comparable.CompareTo(Object2); } } internal delegate bool (object Object1, object Object2); } }