﻿<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:betag="https://blogengine.io/schemas/tags" xmlns="http://www.w3.org/2005/Atom">
  <id>https://robootika.com/</id>
  <title>Reaali Robootika.COM - Informaatika olümpiaadi põhikooli eelvoor – Kurgipeenar</title>
  <updated>2011-12-27T15:19:26+00:00</updated>
  <link href="https://robootika.com/" />
  <link rel="self" href="https://robootika.com/syndication.axd?format=atom" />
  <subtitle>NXT robotimaailm ja programmeerimine C-keeles</subtitle>
  <author>
    <name>Leivo</name>
  </author>
  <generator uri="https://blogengine.io/" version="1.0.0.0">BlogEngine.Net Syndication Generator</generator>
  <blogChannel:blogRoll>https://robootika.com/opml.axd</blogChannel:blogRoll>
  <dc:creator>Leivo</dc:creator>
  <dc:description>NXT robotimaailm ja programmeerimine C-keeles</dc:description>
  <dc:language>en-US</dc:language>
  <dc:title>Reaali Robootika.COM</dc:title>
  <geo:lat>0.000000</geo:lat>
  <geo:long>0.000000</geo:long>
  <entry>
    <id>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_5cfe1155-a955-4c88-8025-6181eeb370aa</id>
    <title>Simmo on &lt;a href="/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_5cfe1155-a955-4c88-8025-6181eeb370aa" alt="/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_5cfe1155-a955-4c88-8025-6181eeb370aa"&gt;Informaatika olümpiaadi põhikooli eelvoor – Kurgipeenar&lt;/a&gt;</title>
    <updated>2011-12-27T15:19:26+00:00</updated>
    <link rel="self" href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_5cfe1155-a955-4c88-8025-6181eeb370aa" />
    <link href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_5cfe1155-a955-4c88-8025-6181eeb370aa" />
    <author>
      <name>Simmo</name>
    </author>
    <summary type="html">See programm alati k&amp;#252;ll &amp;#245;iget tulemust ei leia.

Olgu meil selline p&amp;#245;ld, kus X t&amp;#228;histab masti ning t&amp;#228;idetud ruut suurimat ala:
&lt;cite title="Quote"&gt;/---------\
| | |.|.|.|
-----------
| | |.|.|.|
-----------
| | |.|.|.|
----X------
| | |.|.|.|
--X--------
| | |.|.|.|
\---------/&lt;/cite&gt;
See sisendfail oleks:
&lt;cite title="Quote"&gt;5 5
1 1
2 2&lt;/cite title="Quote"&gt;

See programm aga annab suurimaks pindalaks 8, kuigi korrektne oleks 15. Viga on selles, et programm vaatab juhtumeid, kuid suurim pindala on nurgas v&amp;#245;i kahe masti vahel, kui suurim pindala v&amp;#245;ib olla ka masti ja p&amp;#245;llu &amp;#228;&amp;#228;re vahel.</summary>
    <published>2011-12-27T15:19:26+00:00</published>
    <link rel="related" href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_5cfe1155-a955-4c88-8025-6181eeb370aa#comment" />
    <dc:publisher>Simmo</dc:publisher>
    <pingback:server>https://robootika.com/pingback.axd</pingback:server>
    <pingback:target>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_5cfe1155-a955-4c88-8025-6181eeb370aa</pingback:target>
    <wfw:comment>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_5cfe1155-a955-4c88-8025-6181eeb370aa#comment</wfw:comment>
    <wfw:commentRss>https://robootika.com/syndication.axd?post=5cfe1155-a955-4c88-8025-6181eeb370aa</wfw:commentRss>
  </entry>
  <entry>
    <id>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_ea7b9cf9-dd52-449e-9090-d26b5018f0a6</id>
    <title>Leivo on &lt;a href="/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_ea7b9cf9-dd52-449e-9090-d26b5018f0a6" alt="/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_ea7b9cf9-dd52-449e-9090-d26b5018f0a6"&gt;Informaatika olümpiaadi põhikooli eelvoor – Kurgipeenar&lt;/a&gt;</title>
    <updated>2011-12-27T15:35:47+00:00</updated>
    <link rel="self" href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_ea7b9cf9-dd52-449e-9090-d26b5018f0a6" />
    <link href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_ea7b9cf9-dd52-449e-9090-d26b5018f0a6" />
    <author>
      <name>Leivo</name>
    </author>
    <summary type="html">Ja Sinu toodud variandi korral on &amp;#252;lesandel kaks &amp;#245;iget lahendust ning m&amp;#245;lemad masti ja serva vahel.


&lt;cite title="Quote"&gt;/---------\
|.|.|.|.|.|
-----------
|.|.|.|.|.|
-----------
|.|.|.|.|.|
----X------
| | | | | |
--X--------
| | | | | |
\---------/
&lt;/cite&gt;</summary>
    <published>2011-12-27T15:35:47+00:00</published>
    <link rel="related" href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_ea7b9cf9-dd52-449e-9090-d26b5018f0a6#comment" />
    <dc:publisher>Leivo</dc:publisher>
    <pingback:server>https://robootika.com/pingback.axd</pingback:server>
    <pingback:target>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_ea7b9cf9-dd52-449e-9090-d26b5018f0a6</pingback:target>
    <wfw:comment>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_ea7b9cf9-dd52-449e-9090-d26b5018f0a6#comment</wfw:comment>
    <wfw:commentRss>https://robootika.com/syndication.axd?post=ea7b9cf9-dd52-449e-9090-d26b5018f0a6</wfw:commentRss>
  </entry>
  <entry>
    <id>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_dc7145dd-5b0d-4017-acb8-2e4907ad8188</id>
    <title>Ramses on &lt;a href="/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_dc7145dd-5b0d-4017-acb8-2e4907ad8188" alt="/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_dc7145dd-5b0d-4017-acb8-2e4907ad8188"&gt;Informaatika olümpiaadi põhikooli eelvoor – Kurgipeenar&lt;/a&gt;</title>
    <updated>2011-12-29T22:44:10+00:00</updated>
    <link rel="self" href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_dc7145dd-5b0d-4017-acb8-2e4907ad8188" />
    <link href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_dc7145dd-5b0d-4017-acb8-2e4907ad8188" />
    <author>
      <name>Ramses</name>
    </author>
    <summary type="html">See on &amp;#245;ige lahendus &amp;#252;lesandele. Sobib k&amp;#245;ikide koordinaatidega mis sinna pannakse

&lt;cite title="Quote"&gt;
/*
Autor:Ramses Sepp 29.12.2011
See programm on 2011-a aasta informaatika
ol&amp;#252;mpiaadi p&amp;#245;hikooli eelvooru 2. &amp;#252;lesanne
*/
task main()
{

//P&amp;#245;llu suurus
int X = 6;
int Y = 4;

//1-e posti koordinaadid
int x1 = 0;
int y1 = 2;

//2-e posti koordinaadid
int x2 = 2;
int y2 = 4;

int max;
int Tulemus[8];
int temp;

if(x1 &amp;gt; x2){
	temp = x2;
	x2 = x1;
	x1 = temp;
	temp = y2;
	y2 = y1;
	y1 = temp;
	}

Tulemus[0] = abs((x2-x1)*Y);		//2 masti vahel vertikaalselt
Tulemus[1] = abs((y2-y1)*X);		//2 masti vahel horisontaalselt

if(y1 &amp;gt; y2){
	Tulemus[2] = x2*y1;						//2 mastiga vasakule alla
	Tulemus[3] = (X-x1)*(Y-y2);		//2 mastiga paremale &amp;#252;les
	Tulemus[4] = X*y2;						//alla
	Tulemus[5] = X*(Y-y1);				//&amp;#252;les
	}
else{
	Tulemus[2] = (Y-y1)*x2;				//2 mastiga vasakule &amp;#252;les
	Tulemus[3] = (X-x1)*y2;				//2 mastiga paremale alla
	Tulemus[4] = X*y1;						//alla
	Tulemus[5] = X*(Y-y2);				//&amp;#252;les
	}

Tulemus[6] = (X-x2)*Y;					//Parem
Tulemus[7] = x1*Y;							//Vasak

//maksimumi leidmine
for(int i=0; i&amp;lt;8;i++) 
	max = max &amp;lt; Tulemus[i] ? Tulemus[i] : max ; 

NumOut(45, LCD_LINE5, max);
Wait(SEC_10);
}
&lt;/cite&gt;</summary>
    <published>2011-12-29T22:44:10+00:00</published>
    <link rel="related" href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_dc7145dd-5b0d-4017-acb8-2e4907ad8188#comment" />
    <dc:publisher>Ramses</dc:publisher>
    <pingback:server>https://robootika.com/pingback.axd</pingback:server>
    <pingback:target>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_dc7145dd-5b0d-4017-acb8-2e4907ad8188</pingback:target>
    <wfw:comment>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_dc7145dd-5b0d-4017-acb8-2e4907ad8188#comment</wfw:comment>
    <wfw:commentRss>https://robootika.com/syndication.axd?post=dc7145dd-5b0d-4017-acb8-2e4907ad8188</wfw:commentRss>
  </entry>
  <entry>
    <id>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_261bdc0d-0041-42af-aab7-8553be686254</id>
    <title>Rao Zvorovski on &lt;a href="/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_261bdc0d-0041-42af-aab7-8553be686254" alt="/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_261bdc0d-0041-42af-aab7-8553be686254"&gt;Informaatika olümpiaadi põhikooli eelvoor – Kurgipeenar&lt;/a&gt;</title>
    <updated>2011-12-30T20:32:11+00:00</updated>
    <link rel="self" href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_261bdc0d-0041-42af-aab7-8553be686254" />
    <link href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_261bdc0d-0041-42af-aab7-8553be686254" />
    <author>
      <name>Rao Zvorovski</name>
    </author>
    <summary type="html">Ramsese laheńdusele failist v&amp;#245;tmine ja faili panemine juurde pandud

task main()
{

FILE *sisend, *valmis;
int max;
int Tulemus[8];
int temp;

sisend = fopen(&amp;quot;kolmnurk.sis&amp;quot;, &amp;quot;r&amp;quot;);        
   fscanf(sisend, &amp;quot;%i %i&amp;quot;, &amp;amp;X, &amp;amp;Y);
   fscanf(sisend, &amp;quot;%i %i&amp;quot;, &amp;amp;x1, &amp;amp;1);      
   fscanf(sisend, &amp;quot;%i %i&amp;quot;, &amp;amp;x2, &amp;amp;2);                  
   fclose(sisend);                   

if(x1 &amp;gt; x2){
  temp = x2;
  x2 = x1;
  x1 = temp;
  temp = y2;
  y2 = y1;
  y1 = temp;
  }

Tulemus[0] = abs((x2-x1)*Y);    //2 masti vahel vertikaalselt
Tulemus[1] = abs((y2-y1)*X);    //2 masti vahel horisontaalselt

if(y1 &amp;gt; y2){
  Tulemus[2] = x2*y1;            //2 mastiga vasakule alla
  Tulemus[3] = (X-x1)*(Y-y2);    //2 mastiga paremale &amp;#252;les
  Tulemus[4] = X*y2;            //alla
  Tulemus[5] = X*(Y-y1);        //&amp;#252;les
  }
else{
  Tulemus[2] = (Y-y1)*x2;        //2 mastiga vasakule &amp;#252;les
  Tulemus[3] = (X-x1)*y2;        //2 mastiga paremale alla
  Tulemus[4] = X*y1;            //alla
  Tulemus[5] = X*(Y-y2);        //&amp;#252;les
  }

Tulemus[6] = (X-x2)*Y;          //Parem
Tulemus[7] = x1*Y;              //Vasak

//maksimumi leidmine
for(int i=0; i&amp;lt;8;i++) 
  max = max &amp;lt; Tulemus[i] ? Tulemus[i] : max ; 

   /* v&amp;#228;ljastame tulemuse */
   valmis = fopen(&amp;quot;kurgid.val&amp;quot;, &amp;quot;w&amp;quot;);      
   fprintf(valmis, &amp;quot;%i\n&amp;quot;, max);                          
   fclose(valmis);                                   
   return 0;

}
</summary>
    <published>2011-12-30T20:32:11+00:00</published>
    <link rel="related" href="https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_261bdc0d-0041-42af-aab7-8553be686254#comment" />
    <dc:publisher>Rao Zvorovski</dc:publisher>
    <pingback:server>https://robootika.com/pingback.axd</pingback:server>
    <pingback:target>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_261bdc0d-0041-42af-aab7-8553be686254</pingback:target>
    <wfw:comment>https://robootika.com/post/Informaatika-olumpiaadi-eelvoor-2011-pohikool-ulesanne-2#id_261bdc0d-0041-42af-aab7-8553be686254#comment</wfw:comment>
    <wfw:commentRss>https://robootika.com/syndication.axd?post=261bdc0d-0041-42af-aab7-8553be686254</wfw:commentRss>
  </entry>
</feed>