<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125449</guid>
        <pubDate>Mon, 17 Feb 2003 03:58:09 +0000</pubDate>
        <title>Сортировка точек</title>
        <link>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125449</link>
        <description><![CDATA[Anton_is_Orenburga: Пасиба!]]></description>
        <author>Anton_is_Orenburga</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125448</guid>
        <pubDate>Sun, 16 Feb 2003 19:24:47 +0000</pubDate>
        <title>Сортировка точек</title>
        <link>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125448</link>
        <description><![CDATA[SergM: Возьму на себя смелость дать анализ этих двух программ.<br><br>Первая, в зависимости от расклада, сравнивает от 3 до 5 раз,<br>3 раза присваивает и 1 или 2 раза логически умножает.<br><br>Вторая сравнивает 3 раза и присваивает(опять же в зависимости<br>от расклада) от 3 до 12 раз<br><br>Если человеку нужен самый быстрый код, то вот в этой программе<br>3(или даже 2) сравнения и 3 присвоения при любых значениях.<br><br>. . . . . . . . . . . . .<br>if a1.y&lt;b1.y then if c1.y&lt;b1.y then if c1.y&lt;a1.y then begin a:=c1; b:=a1; c:=b1 end<br>                                                                 else begin a:=a1; b:=c1; c:=b1 end<br>                                         else begin a:=a1; b:=b1; c:=c1 end<br>                 else if c1.y&lt;a1.y then if c1.y&lt;b1.y then begin a:=c1; b:=b1; c:=a1 end<br>                                                                 else begin a:=b1; b:=c1; c:=a1 end<br>                                         else begin a:=b1; b:=a1; c:=c1 end;<br>. . . . . . . . . . . . .]]></description>
        <author>SergM</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125447</guid>
        <pubDate>Sun, 16 Feb 2003 16:21:15 +0000</pubDate>
        <title>Сортировка точек</title>
        <link>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125447</link>
        <description><![CDATA[Some1: А я бы предложил такой вариант: маленький метод пузырька:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">type</div><div class="code_line">&nbsp;&nbsp;Point=record &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;x,y:integer; &nbsp;</div><div class="code_line">&nbsp;&nbsp;end; </div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;a1,b1,c1:point; </div><div class="code_line">&nbsp;&nbsp;a,b,c,temp:point; &nbsp;</div><div class="code_line">begin</div><div class="code_line">...................</div><div class="code_line">&nbsp;&nbsp;a:=a1;</div><div class="code_line">&nbsp;&nbsp;b:=b1;</div><div class="code_line">&nbsp;&nbsp;c:=c1;</div><div class="code_line">&nbsp;&nbsp;if a.y&#62;b.y then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;temp:=a;</div><div class="code_line">&nbsp;&nbsp; &nbsp;a:=b;</div><div class="code_line">&nbsp;&nbsp; &nbsp;b:=temp;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;&nbsp;if b.y&#62;c.y then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;temp:=b;</div><div class="code_line">&nbsp;&nbsp; &nbsp;b:=c;</div><div class="code_line">&nbsp;&nbsp; &nbsp;c:=temp;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;&nbsp;if a.y&#62;b.y then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;temp:=a;</div><div class="code_line">&nbsp;&nbsp; &nbsp;a:=b;</div><div class="code_line">&nbsp;&nbsp; &nbsp;b:=temp;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">...................</div><div class="code_line">end.</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>Some1</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125446</guid>
        <pubDate>Sun, 16 Feb 2003 16:09:20 +0000</pubDate>
        <title>Сортировка точек</title>
        <link>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125446</link>
        <description><![CDATA[7in: Хе&#33; :)<br>
Попробуй так (не проверено, но д.б. правильно):<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">If (A1.Y &#60;= B1.Y) and (A1.Y &#60;= C1.Y) then</div><div class="code_line">&nbsp;&nbsp; Begin A := A1; If B1.Y &#60;= C1.Y then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Begin B := B1; C := C1 End else Begin B := C1; C := B1 End End</div><div class="code_line">else If (B1.Y &#60;= C1.Y) and (B1.Y &#60;= A1.Y) then</div><div class="code_line">&nbsp;&nbsp; Begin A := B1; If C1.Y &#60;= A1.Y then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Begin B := C1; C := A1 End else Begin B := A1; C := C1 End End</div><div class="code_line">else {If (C1.Y &#60;= A1.Y) and (C1.Y &#60;= B1.Y) then}</div><div class="code_line">&nbsp;&nbsp; Begin A := C1; If A1.Y &#60;= B1.Y then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Begin B := A1; C := B1 End else Begin B := B1; C := A1 End End</div></ol></div></div></div></div>]]></description>
        <author>7in</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125445</guid>
        <pubDate>Sun, 16 Feb 2003 13:45:09 +0000</pubDate>
        <title>Сортировка точек</title>
        <link>https://forum.sources.ru/index.php?showtopic=14933&amp;view=findpost&amp;p=125445</link>
        <description><![CDATA[Anton_is_Orenburga: Дано описание <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Point=record </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x,y:integer; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">a1,b1,c1:point;</div><div class="code_line">a,b,c:point;</div></ol></div></div></div></div><br>
Так вот мне нужен наибыстрейший код сортировки точек a1, b1, c1 так чтобы в A оказалась точка с минимальным значением Y, в C с максимальным значением, а в B со средним значением Y.]]></description>
        <author>Anton_is_Orenburga</author>
        <category>Pascal</category>
      </item>
	
      </channel>
      </rss>
	