<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://united-coders.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>united-coders.com - google</title>
 <link>http://united-coders.com/taxonomy/term/25/0</link>
 <description></description>
 <language>en</language>
<item>
 <title>2011 google Developer Day - all slides and links</title>
 <link>http://united-coders.com/christian-harms/2011-google-developer-day-all-slides-and-links</link>
 <description>&lt;p&gt;After a long saturday in berlin I could write some facts about the talks and list all the news. But the gdd world tour is over and all speaker announced to publish the slides. So I will offer the not-complete list.&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/christian-harms/2011-google-developer-day-all-slides-and-links&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table border=&quot;1&quot; bgcolor=&quot;white&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Android&lt;/th&gt;
&lt;th&gt;Chrome &amp;amp; HTML5&lt;/th&gt;
&lt;th&gt;Cloud&lt;/th&gt;
&lt;th&gt;Google+&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Android Market for Developers (&lt;a href=&quot;http://www.youtube.com/watch?v=eyn2jrk8PR0&quot; alt=&quot;Android Market for Developers video&quot;&gt;video&lt;/a&gt;)&lt;br /&gt;
 - Rich Hyndman (&lt;a href=&quot;https://plus.google.com/115995639636688350464&quot;&gt;G+&lt;/a&gt;)
&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://mkw.st/p/gdd11-berlin-a11y/#1&quot;&gt;Making Your Web Apps Accessible Using HTML5 and ChromeVox&lt;/a&gt;&lt;br /&gt;
 - Mike West (&lt;a href=&quot;https://mkw.st/+&quot;&gt;G+&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/@mikewest&quot;&gt;Twitter&lt;/a&gt; &lt;a href=&quot;https://mikewest.org/&quot;&gt;blog&lt;/a&gt;)
&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://mano-demos.googlecode.com/svn/trunk/slides/gddplaces2011-de/Geo-Places-API/index.html&quot;&gt;Finding Your Place in the World: Google Places API&lt;/a&gt;&lt;br /&gt;
 - Mano Marks (&lt;a href=&quot;https://plus.google.com/107054744026933176373&quot;&gt;G+&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/ManoMarks&quot;&gt;twitter&lt;/a&gt; and &lt;a href=&quot;http://randommarkers.blogspot.com/&quot;&gt;blog&lt;/a&gt;)
&lt;/td&gt;
&lt;td&gt;Google+ and the +1 Button&lt;br /&gt;
 - Ade Oshineye (&lt;a href=&quot;https://plus.google.com/u/0/105037104815911535953&quot;&gt;G+&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/ade_oshineye&quot;&gt;twitter&lt;/a&gt; and &lt;a href=&quot;http://blog.oshineye.com/&quot;&gt;blog&lt;/a&gt;)
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/christian-harms/2011-google-developer-day-all-slides-and-links&quot; dc:identifier=&quot;http://united-coders.com/christian-harms/2011-google-developer-day-all-slides-and-links&quot; dc:title=&quot;2011 google Developer Day - all slides and links&quot; trackback:ping=&quot;http://united-coders.com/trackback/114&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-2857&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/christian-harms/2011-google-developer-day-all-slides-and-links#comments</comments>
 <category domain="http://united-coders.com/category/tags/berlin">berlin</category>
 <category domain="http://united-coders.com/category/tags/gdd">gdd</category>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <category domain="http://united-coders.com/category/tags/links">links</category>
 <category domain="http://united-coders.com/category/tags/slide">slide</category>
 <category domain="http://united-coders.com/category/tags/talks">talks</category>
 <pubDate>Thu, 24 Nov 2011 17:02:27 +0000</pubDate>
 <dc:creator>Christian Harms</dc:creator>
 <guid isPermaLink="false">114 at http://united-coders.com</guid>
</item>
<item>
 <title>Google Code Jam - Space Emergency</title>
 <link>http://united-coders.com/nico-heid/google-code-jam-space-emergency</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;&lt;a href=&quot;http://code.google.com/codejam/contest/dashboard?c=1128486#s=p1&amp;amp;a=1&quot;&gt;Space Emergency&lt;/a&gt; is a nice little puzzle from Google Code Jam 2011.&lt;/p&gt;
&lt;p&gt;The solution is quite simple. Fly as long as the boosters are built. Once they are done, reorder your remaining distance. Use the boosters on longest distances. Voila - that&#039;s it.&lt;/p&gt;
&lt;p&gt;Let’s see the &lt;a href=&quot;https://github.com/nheid/unitedcoders-examples/blob/f9eecfdec15498e5299dcd509e396190d37d49c8/src-java/com/unitedcoders/examples/codejam/SpaceEmergency.java&quot;&gt;straight forward implementation for the small input.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;java geshifilter-java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt; casenr &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; casenr &lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;=&lt;/span&gt; testcases&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; casenr&lt;span style=&quot;color: #339933;&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #003399;&quot;&gt;Integer&lt;/span&gt; time &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #003399;&quot;&gt;Integer&lt;/span&gt; boosters &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; scanner.&lt;span style=&quot;color: #006633;&quot;&gt;nextInt&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// L&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;long&lt;/span&gt; buildTime &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; scanner.&lt;span style=&quot;color: #006633;&quot;&gt;nextLong&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// t&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #003399;&quot;&gt;Integer&lt;/span&gt; finalStar &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; scanner.&lt;span style=&quot;color: #006633;&quot;&gt;nextInt&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// N&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #003399;&quot;&gt;Integer&lt;/span&gt; stars &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; scanner.&lt;span style=&quot;color: #006633;&quot;&gt;nextInt&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// C&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt; distances &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/nico-heid/google-code-jam-space-emergency&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/nico-heid/google-code-jam-space-emergency&quot; dc:identifier=&quot;http://united-coders.com/nico-heid/google-code-jam-space-emergency&quot; dc:title=&quot;Google Code Jam - Space Emergency&quot; trackback:ping=&quot;http://united-coders.com/trackback/105&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-2562&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/nico-heid/google-code-jam-space-emergency#comments</comments>
 <category domain="http://united-coders.com/category/tags/code-jam">code jam</category>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <category domain="http://united-coders.com/category/tags/java">java</category>
 <pubDate>Mon, 18 Jul 2011 12:54:49 +0000</pubDate>
 <dc:creator>Nico Heid</dc:creator>
 <guid isPermaLink="false">105 at http://united-coders.com</guid>
</item>
<item>
 <title>Google Code Jam - Picking Up Chicks</title>
 <link>http://united-coders.com/nico-heid/google-code-jam-picking-up-chicks</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;&lt;a href=&quot;http://code.google.com/codejam/contest/dashboard?c=635101#s=p1&quot;&gt;This is a problem&lt;/a&gt; I particularly enjoyed. I had to turn it around a few times in my head before I found the solution.&lt;/p&gt;
&lt;p&gt;First I was thinking about simulation the chickens moving before noticing I am going in the totally wrong direction.&lt;br /&gt;
Then it dawned to me, that the solution is quite simple.&lt;/p&gt;
&lt;p&gt;We can break the solution down into two parts.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is the specific case solvable&lt;/li&gt;
&lt;li&gt;How many swaps do we need&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Is the specific case solvable&lt;/h2&gt;
&lt;p&gt;Leaving all other aspects aside, just check if enough chickens can make it to the barn in time. If this is not the case, it&#039;s an IMPOSSIBLE one to solve.&lt;br /&gt;
For this to find out, you only need to get their position, add the speed multiplied by the time you have at hands and see if they make it into safety, also known as the barn.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;java geshifilter-java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt; finishers &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; isFastEnough &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;startposition.&lt;span style=&quot;color: #006633;&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/nico-heid/google-code-jam-picking-up-chicks&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/nico-heid/google-code-jam-picking-up-chicks&quot; dc:identifier=&quot;http://united-coders.com/nico-heid/google-code-jam-picking-up-chicks&quot; dc:title=&quot;Google Code Jam - Picking Up Chicks&quot; trackback:ping=&quot;http://united-coders.com/trackback/102&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-4333&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/nico-heid/google-code-jam-picking-up-chicks#comments</comments>
 <category domain="http://united-coders.com/category/tags/code-jam">code jam</category>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <category domain="http://united-coders.com/category/tags/java">java</category>
 <pubDate>Wed, 13 Apr 2011 17:36:51 +0000</pubDate>
 <dc:creator>Nico Heid</dc:creator>
 <guid isPermaLink="false">102 at http://united-coders.com</guid>
</item>
<item>
 <title>Google Code Jam - Minimum Scalar Product</title>
 <link>http://united-coders.com/nico-heid/google-code-jam-minimum-scalar-product</link>
 <description>&lt;p&gt;With the &lt;a href=&quot;http://code.google.com/codejam&quot; target=&quot;_blank&quot;&gt;Google Code Jam 2011&lt;/a&gt; less than four weeks away, it is time for some finger exercises.&lt;/p&gt;
&lt;p&gt;Let&#039;s start with the &lt;a href=&quot;http://code.google.com/codejam/contest/dashboard?c=32016#s=p0&amp;amp;a=0&quot; target=&quot;_blank&quot;&gt;Minimum Scalar Product&lt;/a&gt;, which should only take you a few minutes.&lt;/p&gt;
&lt;p&gt;Here&#039;s the Java version, which will only work for the small input set. I&#039;ll explain later.&lt;br /&gt;
&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;java geshifilter-java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt; getMinimumScalarProduct2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; x, &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; y&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #003399;&quot;&gt;Arrays&lt;/span&gt;.&lt;span style=&quot;color: #006633;&quot;&gt;sort&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #003399;&quot;&gt;Arrays&lt;/span&gt;.&lt;span style=&quot;color: #006633;&quot;&gt;sort&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt; sum&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; i &lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt; x.&lt;span style=&quot;color: #006633;&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; i&lt;span style=&quot;color: #339933;&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum &lt;span style=&quot;color: #339933;&quot;&gt;+=&lt;/span&gt; x&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt; y&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;x.&lt;span style=&quot;color: #006633;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;return&lt;/span&gt; sum&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;What we do is sort both arrays, then multiply them. One starting from the beginning, the other from the end. So our biggest numbers are multiplied with the smallest. The math is on Google&#039;s solution page, we&#039;re just looking at coding here.&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/nico-heid/google-code-jam-minimum-scalar-product&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/nico-heid/google-code-jam-minimum-scalar-product&quot; dc:identifier=&quot;http://united-coders.com/nico-heid/google-code-jam-minimum-scalar-product&quot; dc:title=&quot;Google Code Jam - Minimum Scalar Product&quot; trackback:ping=&quot;http://united-coders.com/trackback/101&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-9310&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/nico-heid/google-code-jam-minimum-scalar-product#comments</comments>
 <category domain="http://united-coders.com/category/tags/code-jam">code jam</category>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <category domain="http://united-coders.com/category/tags/java">java</category>
 <category domain="http://united-coders.com/category/tags/python">python</category>
 <pubDate>Sun, 10 Apr 2011 12:52:54 +0000</pubDate>
 <dc:creator>Nico Heid</dc:creator>
 <guid isPermaLink="false">101 at http://united-coders.com</guid>
</item>
<item>
 <title>First picture impression from google developer day 2010 </title>
 <link>http://united-coders.com/christian-harms/first-picture-impression-from-google-developer-day-2010</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;Yesterday it was a very long day starting at 7 o&#039;clock on the M.U.C in munich (ends 8 pm) - here only the first visual impressions from the &lt;a href=&quot;http://www.google.com/events/developerday/2010/munich/&quot;&gt;google developer day 2010&lt;/a&gt; in munich. Later I will give some written impressions to the &lt;a href=&quot;http://www.google.com/events/developerday/2010/munich/agenda.html&quot;&gt;talks&lt;/a&gt; and I try to collect all links to the shared documents (or help with comments).&lt;/p&gt;
&lt;p&gt;&lt;a title=&quot;audience for the long keynote&quot; href=&quot;/imagepicker/image/39&quot;&gt;&lt;img src=&quot;http://united-coders.com/sites/default/files/imagepicker/4/keynote_audience.jpg&quot; alt=&quot;audience for the long keynote&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;imgp_desc&quot;&gt;The hall is filling with over 1000 android/javascript/python/java developer - waiting for the keynotes&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/christian-harms/first-picture-impression-from-google-developer-day-2010&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/christian-harms/first-picture-impression-from-google-developer-day-2010&quot; dc:identifier=&quot;http://united-coders.com/christian-harms/first-picture-impression-from-google-developer-day-2010&quot; dc:title=&quot;First picture impression from google developer day 2010 &quot; trackback:ping=&quot;http://united-coders.com/trackback/88&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-7836&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/christian-harms/first-picture-impression-from-google-developer-day-2010#comments</comments>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <pubDate>Tue, 09 Nov 2010 22:51:49 +0000</pubDate>
 <dc:creator>Christian Harms</dc:creator>
 <guid isPermaLink="false">88 at http://united-coders.com</guid>
</item>
<item>
 <title>Google code jam solution for alien numbers</title>
 <link>http://united-coders.com/christian-harms/google-code-jam-solution-for-alien-numbers</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;Time again for a new google code jam article about &lt;a href=&quot;http://code.google.com/codejam/contest/dashboard?c=32003#&quot;&gt;alien numbers&lt;/a&gt;. This time instead of &lt;a href=&quot;http://united-coders.com/christian-harms/google-code-jam-solution-for-alien-language&quot;&gt;decoding words&lt;/a&gt; from an other alien language we have to convert numbers from one alien digit system to another.&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/christian-harms/google-code-jam-solution-for-alien-numbers&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/christian-harms/google-code-jam-solution-for-alien-numbers&quot; dc:identifier=&quot;http://united-coders.com/christian-harms/google-code-jam-solution-for-alien-numbers&quot; dc:title=&quot;Google code jam solution for alien numbers&quot; trackback:ping=&quot;http://united-coders.com/trackback/75&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-8151&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/christian-harms/google-code-jam-solution-for-alien-numbers#comments</comments>
 <category domain="http://united-coders.com/category/tags/alien-numbers">alien numbers</category>
 <category domain="http://united-coders.com/category/tags/code-jam">code jam</category>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <category domain="http://united-coders.com/category/tags/number-base-conversion">number base conversion</category>
 <pubDate>Mon, 20 Sep 2010 19:19:25 +0000</pubDate>
 <dc:creator>Christian Harms</dc:creator>
 <guid isPermaLink="false">75 at http://united-coders.com</guid>
</item>
<item>
 <title>Google code jam solution for alien language</title>
 <link>http://united-coders.com/christian-harms/google-code-jam-solution-for-alien-language</link>
 <description>&lt;h2&gt;Problem&lt;/h2&gt;
&lt;p&gt;In the &lt;a href=”http://code.google.com/codejam/contest/dashboard?c=90101”&gt;2009 qualification round&lt;/a&gt; there was a simple problem with a nice background story:&lt;/p&gt;
&lt;p&gt;After years of study, scientists at Google Labs have discovered an alien language transmitted from a faraway planet. The alien language is very unique in that every word consists of exactly L lowercase letters. Also, there are exactly D words in this language.&lt;/p&gt;
&lt;p&gt;Once the dictionary of all the words in the alien language was built, the next breakthrough was to discover that the aliens have been transmitting messages to Earth for the past decade. Unfortunately, these signals are weakened due to the distance between our two planets and some of the words may be misinterpreted. In order to help them decipher these messages, the scientists have asked you to devise an algorithm that will determine the number of possible interpretations for a given pattern.&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/christian-harms/google-code-jam-solution-for-alien-language&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/christian-harms/google-code-jam-solution-for-alien-language&quot; dc:identifier=&quot;http://united-coders.com/christian-harms/google-code-jam-solution-for-alien-language&quot; dc:title=&quot;Google code jam solution for alien language&quot; trackback:ping=&quot;http://united-coders.com/trackback/73&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-6515&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/christian-harms/google-code-jam-solution-for-alien-language#comments</comments>
 <category domain="http://united-coders.com/category/tags/contest">contest</category>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <category domain="http://united-coders.com/category/tags/jam">jam</category>
 <category domain="http://united-coders.com/category/tags/python">python</category>
 <pubDate>Mon, 30 Aug 2010 09:58:16 +0000</pubDate>
 <dc:creator>Christian Harms</dc:creator>
 <guid isPermaLink="false">73 at http://united-coders.com</guid>
</item>
<item>
 <title>The rotate google contest in 15 lines</title>
 <link>http://united-coders.com/christian-harms/the-rotate-google-contest-in-15-lines</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;The &lt;a href=&quot;http://united-coders.com/nico-heid/google-code-jam-rotate&quot;&gt;rotate example&lt;/a&gt; nico last week reported was funny to solve: No rotating needed! Read the complete problem description in &lt;a href=&quot;http://united-coders.com/nico-heid/google-code-jam-rotate&quot;&gt;nicos article&lt;/a&gt; or in the google &lt;a href=&quot;http://code.google.com/codejam/contest/dashboard?c=544101#&quot;&gt;code contest&lt;/a&gt; page. Here my complete python solution with file handling and solution printing.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;python geshifilter-python&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sys&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;re&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; search&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;fp = &lt;span style=&quot;color: #008000;&quot;&gt;file&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #dc143c;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;argv&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; case &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;range&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;, &lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;+&lt;span style=&quot;color: #008000;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;fp.&lt;span style=&quot;color: black;&quot;&gt;next&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; n, k = &lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; x &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; fp.&lt;span style=&quot;color: black;&quot;&gt;next&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;split&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; lines = &lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;fp.&lt;span style=&quot;color: black;&quot;&gt;next&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; x &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;range&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;n&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#right-gravitation and joining to one line (delim is a line)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; s = &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;#&amp;quot;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;lambda&lt;/span&gt; x:&lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;%%%ds&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;%&lt;/span&gt;n&lt;span style=&quot;color: #66cc66;&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;x.&lt;span style=&quot;color: black;&quot;&gt;strip&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;replace&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;.&amp;quot;&lt;/span&gt;,&lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;, lines&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; result = &lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#find one of the 4 variants: horiz, verti, slash, backslash for Blue&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; reB = &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;(B.{%%d}){%d}B&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;k-&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/christian-harms/the-rotate-google-contest-in-15-lines&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/christian-harms/the-rotate-google-contest-in-15-lines&quot; dc:identifier=&quot;http://united-coders.com/christian-harms/the-rotate-google-contest-in-15-lines&quot; dc:title=&quot;The rotate google contest in 15 lines&quot; trackback:ping=&quot;http://united-coders.com/trackback/72&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-4981&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/christian-harms/the-rotate-google-contest-in-15-lines#comments</comments>
 <category domain="http://united-coders.com/category/tags/contest">contest</category>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <category domain="http://united-coders.com/category/tags/python">python</category>
 <pubDate>Thu, 19 Aug 2010 11:35:38 +0000</pubDate>
 <dc:creator>Christian Harms</dc:creator>
 <guid isPermaLink="false">72 at http://united-coders.com</guid>
</item>
<item>
 <title>Google Code Jam - Rotate</title>
 <link>http://united-coders.com/nico-heid/google-code-jam-rotate</link>
 <description>&lt;p&gt;It&#039;s time for some basic finger exercise. The &lt;a href=&quot;http://code.google.com/codejam/contest/dashboard?c=544101#&quot; target=&quot;_blank&quot;&gt;Google Code Jam Rotate&lt;/a&gt; is very trivial, so relax and fire up your IDE.&lt;/p&gt;
&lt;p&gt;I was a bit lazy, so there is no reading of the input sets, just a two-dimensional array and two functions&lt;/p&gt;
&lt;h3&gt;Rotating&lt;/h3&gt;
&lt;p&gt;As the Google solution pointed out, there is actually no need to really rotate the 2dim array. Just push everything to the right, as if gravity would be to the right. That&#039;s the same as rotating everything and keeping gravity towards the bottom. But we save a few lines this way.&lt;/p&gt;
&lt;p&gt;So here is the &quot;gravity from the right&quot; code&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;java geshifilter-java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;void&lt;/span&gt; fakeRotate&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; board&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; i &lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt; N&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; i&lt;span style=&quot;color: #339933;&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; N &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; j &lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; j&lt;span style=&quot;color: #339933;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;board&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;.&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// push to right&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;int&lt;/span&gt; m &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;j &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; m&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt; N &lt;span style=&quot;color: #339933;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; board&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; m&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;.&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/nico-heid/google-code-jam-rotate&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/nico-heid/google-code-jam-rotate&quot; dc:identifier=&quot;http://united-coders.com/nico-heid/google-code-jam-rotate&quot; dc:title=&quot;Google Code Jam - Rotate&quot; trackback:ping=&quot;http://united-coders.com/trackback/71&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-2502&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/nico-heid/google-code-jam-rotate#comments</comments>
 <category domain="http://united-coders.com/category/tags/code-jam">code jam</category>
 <category domain="http://united-coders.com/category/tags/code-puzzles">code puzzles</category>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <category domain="http://united-coders.com/category/tags/java">java</category>
 <pubDate>Sun, 15 Aug 2010 16:33:08 +0000</pubDate>
 <dc:creator>Nico Heid</dc:creator>
 <guid isPermaLink="false">71 at http://united-coders.com</guid>
</item>
<item>
 <title>Google Code Jam - Theme Park</title>
 <link>http://united-coders.com/nico-heid/google-code-jam-theme-park</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;Theme Park is another good example of a problem which can be solved with a fairly simple algorithm. The simple version will solve the small input set without a problem, but will run almost infinitely with the large dataset.&lt;/p&gt;
&lt;p&gt;You can read the problem on the Google Code Jam site: &lt;a href=&quot;http://code.google.com/codejam/contest/dashboard?c=433101#s=p2&quot;&gt;Theme Park&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;simple solution&lt;/h3&gt;
&lt;p&gt;The simple solution is to put the groups in a static array, use a pointer that &quot;wraps around&quot; using modulo and fill the roller coaster until it&#039;s so full, that the next group does not fit in, then let it ride earning income accordingly to the seats taken.&lt;/p&gt;
&lt;p&gt;This is a correct solution, but unfortunately a bit slow. The input set can have a roller coaster with up to 10&lt;sup&gt;9&lt;/sup&gt; seats and 10&lt;sup&gt;8&lt;/sup&gt; rides and groups as large as 10&lt;sup&gt;7&lt;/sup&gt;. &lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/nico-heid/google-code-jam-theme-park&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/nico-heid/google-code-jam-theme-park&quot; dc:identifier=&quot;http://united-coders.com/nico-heid/google-code-jam-theme-park&quot; dc:title=&quot;Google Code Jam - Theme Park&quot; trackback:ping=&quot;http://united-coders.com/trackback/69&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-3957&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/nico-heid/google-code-jam-theme-park#comments</comments>
 <category domain="http://united-coders.com/category/tags/code-jam">code jam</category>
 <category domain="http://united-coders.com/category/tags/code-puzzles">code puzzles</category>
 <category domain="http://united-coders.com/category/tags/google">google</category>
 <category domain="http://united-coders.com/category/tags/java">java</category>
 <pubDate>Sat, 31 Jul 2010 11:20:45 +0000</pubDate>
 <dc:creator>Nico Heid</dc:creator>
 <guid isPermaLink="false">69 at http://united-coders.com</guid>
</item>
</channel>
</rss>


