<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ICPC World Finals: Day 2</title>
	<atom:link href="http://www.mccambridge.org/blog/2006/04/icpc-world-finals-day-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mccambridge.org/blog/2006/04/icpc-world-finals-day-2/</link>
	<description>Thoughts, Projects, Happenings, Ideas</description>
	<lastBuildDate>Sun, 13 May 2012 20:56:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jon</title>
		<link>http://www.mccambridge.org/blog/2006/04/icpc-world-finals-day-2/comment-page-1/#comment-76</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Thu, 13 Apr 2006 06:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mccambridge.org/blog/2006/04/icpc-world-finals-day-2/#comment-76</guid>
		<description>Yeah I know I could use summation formulas but really why write code for that?  Plus I have to think back to algebra.  EW!</description>
		<content:encoded><![CDATA[<p>Yeah I know I could use summation formulas but really why write code for that?  Plus I have to think back to algebra.  EW!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin M</title>
		<link>http://www.mccambridge.org/blog/2006/04/icpc-world-finals-day-2/comment-page-1/#comment-77</link>
		<dc:creator>Colin M</dc:creator>
		<pubDate>Thu, 13 Apr 2006 06:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mccambridge.org/blog/2006/04/icpc-world-finals-day-2/#comment-77</guid>
		<description>Well no, it didn&#039;t take us 43 minutes... we had to follow this script of submitting a wrong solution, then asking a clarification, getting the response, modifying our code, and finally submitting it correctly so that we would get used to the contest software.&lt;BR/&gt;&lt;BR/&gt;Actually, there&#039;s two things that you could fix from that implementation (which is roughly what we were told to submit the first time).  Here&#039;s what I would suggest instead, as our final answer:&lt;BR/&gt;&lt;BR/&gt;long sum;&lt;BR/&gt;&lt;BR/&gt;if (N &lt;= 0)&lt;BR/&gt;  sum = 1 - (-N)*(-N+1)/2;&lt;BR/&gt;else&lt;BR/&gt;  sum = N*(N+1)/2;&lt;BR/&gt;&lt;BR/&gt;a) constant-time algorithm&lt;BR/&gt;b) handles N &lt;= 0</description>
		<content:encoded><![CDATA[<p>Well no, it didn&#8217;t take us 43 minutes&#8230; we had to follow this script of submitting a wrong solution, then asking a clarification, getting the response, modifying our code, and finally submitting it correctly so that we would get used to the contest software.</p>
<p>Actually, there&#8217;s two things that you could fix from that implementation (which is roughly what we were told to submit the first time).  Here&#8217;s what I would suggest instead, as our final answer:</p>
<p>long sum;</p>
<p>if (N < = 0)<BR/>  sum = 1 &#8211; (-N)*(-N+1)/2;<br />else<br />  sum = N*(N+1)/2;</p>
<p>a) constant-time algorithm<br />b) handles N <= 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.mccambridge.org/blog/2006/04/icpc-world-finals-day-2/comment-page-1/#comment-78</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Wed, 12 Apr 2006 16:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mccambridge.org/blog/2006/04/icpc-world-finals-day-2/#comment-78</guid>
		<description>It took you 43 minutes to write:&lt;BR/&gt;int sum = 0;&lt;BR/&gt;for(int i = 1 ; i &lt;= N ; i++) {&lt;BR/&gt;    sum += i;&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;return sum;&lt;BR/&gt;&lt;BR/&gt;I really hope I misunderstood your problem since this just took me about 1 second (I&#039;m a slow typer).&lt;BR/&gt;&lt;BR/&gt;Well it sounds like you&#039;re having a lot of fun and I now regret I didn&#039;t make it to their info session/first practice.  To bad I can&#039;t ever do it now.</description>
		<content:encoded><![CDATA[<p>It took you 43 minutes to write:<br />int sum = 0;<br />for(int i = 1 ; i < = N ; i++) {<BR/>    sum += i;<br />}</p>
<p>return sum;</p>
<p>I really hope I misunderstood your problem since this just took me about 1 second (I&#8217;m a slow typer).</p>
<p>Well it sounds like you&#8217;re having a lot of fun and I now regret I didn&#8217;t make it to their info session/first practice.  To bad I can&#8217;t ever do it now.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

