From 1ac59a3148f6428560dc73b93384957f9cbf2ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E6=98=9F=E7=B9=81?= Date: Wed, 29 Jan 2020 20:25:14 +0800 Subject: [PATCH] Fix 3.2.47 --- 3 Searching/3.2/3.2.47/Form1.cs | 3 +-- 3 Searching/3.2/3.2.47/Form2.cs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/3 Searching/3.2/3.2.47/Form1.cs b/3 Searching/3.2/3.2.47/Form1.cs index bbf8a7eab..bf3e170a8 100644 --- a/3 Searching/3.2/3.2.47/Form1.cs +++ b/3 Searching/3.2/3.2.47/Form1.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; using BinarySearchTree; @@ -81,7 +80,7 @@ private int Test(int n) bst.Put(d, d); } - return bst.AverageInternalPathLength() + 1; + return bst.AverageInternalPathLength(); } private int[] GetRandomInt(int n) diff --git a/3 Searching/3.2/3.2.47/Form2.cs b/3 Searching/3.2/3.2.47/Form2.cs index 03d5b6783..2e261f66c 100644 --- a/3 Searching/3.2/3.2.47/Form2.cs +++ b/3 Searching/3.2/3.2.47/Form2.cs @@ -17,7 +17,7 @@ public void Draw(Dictionary data) { var panel = CreateGraphics(); var unitX = (float)ClientRectangle.Width / data.Count; - var unitY = (float)(ClientRectangle.Height / data.Values.Max()); + var unitY = (float)(ClientRectangle.Height / (1.39 * Math.Log2(data.Keys.Max()) - 1.85)); for (var i = data.Keys.Min(); i < data.Keys.Max(); i++) {