<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Competitive Programming on Unnamed Website</title><link>https://unnamed.website/tags/competitive-programming/</link><description>Recent content in Competitive Programming on Unnamed Website</description><generator>Hugo</generator><language>en-us</language><managingEditor>Anthony Wang</managingEditor><webMaster>Anthony Wang</webMaster><lastBuildDate>Fri, 10 Mar 2023 03:09:25 +0000</lastBuildDate><atom:link href="https://unnamed.website/tags/competitive-programming/index.xml" rel="self" type="application/rss+xml"/><item><title>Ennui</title><link>https://unnamed.website/posts/ennui/</link><pubDate>Fri, 10 Mar 2023 03:09:25 +0000</pubDate><author>Anthony Wang</author><guid>https://unnamed.website/posts/ennui/</guid><description>&lt;p&gt;Oh, great. Another doe-eyed rebellious anime girl to add to the endless parade of generics that litter the media landscape. Ennui, huh? Well, isn&amp;rsquo;t that just perfect.&lt;/p&gt;
&lt;p&gt;Ennui had a seething hatred for modern society, because honestly, who doesn&amp;rsquo;t? She despised the endless monotonicity, er, I meant monotony, of her life and the only emotion she could feel nowadays was boredom. Endless, dull, tedious boredom!&lt;/p&gt;
&lt;p&gt;One day, Ennui had the brilliant idea of running away from home and going for a joyride on the Trans-Siberian Railway. Because, you know, nothing screams excitement quite like sitting in a cramped, musty train for days on end.&lt;/p&gt;</description></item><item><title>Beating the Time Limit</title><link>https://unnamed.website/posts/beating-time-limit/</link><pubDate>Wed, 25 Jan 2023 01:30:50 +0000</pubDate><author>Anthony Wang</author><guid>https://unnamed.website/posts/beating-time-limit/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#pragma GCC optimize(&amp;#34;O3,unroll-loops&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#pragma GCC target(&amp;#34;avx2,bmi,bmi2,lzcnt,popcnt&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#include&lt;/span&gt; &lt;span style="color:#75715e"&gt;&amp;lt;bits/stdc++.h&amp;gt;&lt;/span&gt;&lt;span style="color:#75715e"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;using&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;namespace&lt;/span&gt; std;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;main&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; N &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1e5&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#66d9ef"&gt;long&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;long&lt;/span&gt; sum &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; (&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; i &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;; i &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; N; &lt;span style="color:#f92672"&gt;++&lt;/span&gt;i) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		&lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; (&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; j &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;; j &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; N; &lt;span style="color:#f92672"&gt;++&lt;/span&gt;j) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;			sum &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; i&lt;span style="color:#f92672"&gt;^&lt;/span&gt;j;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	cout &lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt; sum;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Hey you! We have here an O(N^2) algorithm with N = 10^5, doing a ridiculous number of operations. How long do you think it takes for this code to run on my laptop?&lt;/p&gt;</description></item><item><title>How to Get Better at Competitive Programming</title><link>https://unnamed.website/posts/get-better-at-cp/</link><pubDate>Mon, 22 Feb 2021 00:00:00 +0000</pubDate><author>Anthony Wang</author><guid>https://unnamed.website/posts/get-better-at-cp/</guid><description>&lt;p&gt;All tips fall into one of two categories: practice, and learning from your mistakes.&lt;/p&gt;
&lt;p&gt;The first category is pretty easy: do a lot of problems and spend a lot of time on CP. You&amp;rsquo;ll automagically see improvements.&lt;/p&gt;
&lt;p&gt;The second category is much more interesting. There are people out there who have done 1000+ problems and are still newbies. Why? Because they are making the same old mistakes over and over again when solving problems. One useful tip might be to record yourself solving problems and doing contests, so it&amp;rsquo;s easier to see when you are wasting time, what makes you stuck, etc. You don&amp;rsquo;t even need to go to this extreme of recording yourself. If you make sure to reflect after solving problems and doing contests, such as what areas you are weak on, which types of problems cause you to get stuck, etc, you can fix these mistakes with pretty easy fixes like doing more problems of a topic if you are weak in that topic. You&amp;rsquo;ll automagically see improvements.&lt;/p&gt;</description></item></channel></rss>