eatmore's blog

By eatmore, history, 6 years ago, In English

Hi all!

There are two changes that Code Jam team have just announced.

The first change is that it is now possible to upsolve this year's problems. To do this, you need to be logged in. Open any past problem and press the "switch to practice mode" button at the top right. Practice mode will be available 24/7 except during official Code Jam rounds. There is also a site-wide limit of 10 submits within any 10 minute window.

The second change is that it is now possible to view and download other participant's code after the contest. To do this, click on the participant's nick in the scoreboard.

Full text and comments »

Tags gcj
  • Vote: I like it
  • +51
  • Vote: I do not like it

By eatmore, history, 6 years ago, In English

Hi all!

Soon thousands of people will participate in Google Code Jam qualification round. There is a problem though: Code Jam website doesn't offer a good place to discuss the problems afterwards. There is an official Google group, but it is a poor place for discussion: not only is it premoderated, but they also reject/delete useful posts, like this one.

There is a solution: point people at Codeforces, the best place to discuss programming competitions! If we just start posting messages about Codeforces to the Google group, they will probably delete them. But there is something else that people (sometimes) read: your code. For many years, Code Jam allowed anyone to read any participant's code after the contest. While the current system doesn't support this yet, this is something that Code Jam team is willing to resolve. So, my idea is for as many people as possible to add a comment like this to every Code Jam submission:

// Discuss this problem on Codeforces: http://codeforces.com/

Or better, use a link to a post about the specific round. This way, those who try to learn by looking at other's code will find out about Codeforces, which is good.

Do you have any similar ideas?

Full text and comments »

  • Vote: I like it
  • +248
  • Vote: I do not like it

By eatmore, history, 6 years ago, In English

Google Code Jam 2018 qualification round will start soon and run for 27 hours. Don't miss it!

Before you start, you may have a look at an old version of the new Code Jam system. Looks like the admins have just forgotten to take it down. If this page doesn't open, you can at least look at some screenshots.

Full text and comments »

  • Vote: I like it
  • +98
  • Vote: I do not like it

By eatmore, history, 6 years ago, In English

Java 10 has been released a few days ago, just six months after Java 9. In this version, I found only one new feature which is useful for competitive programming: Local-Variable Type Inferrence. It works similarly to auto keyword in C++. So now you can write something like this:

var map = new HashMap<Integer, List<String>>();
for (var entry : map.entrySet()) {
    var key = entry.getKey();
    for (var element : entry.getValue()) {
        System.out.println(key + " " + element);
    }
}

If you find any other relevant enhancements, please post them here.

Full text and comments »

  • Vote: I like it
  • +97
  • Vote: I do not like it

By eatmore, history, 7 years ago, In English

A few weeks ago, I participated in Google Code Jam and Distributed Code Jam finals. Later, the finalists were asked to provide some feedback. I think that my feedback may be interesting for other people as well, so I post it here (I also posted it on Google Code Jam group).

Full text and comments »

  • Vote: I like it
  • +195
  • Vote: I do not like it

By eatmore, history, 7 years ago, In English

After reading the editorial for RCC Elimination round problem E, I thought of an easier problem of merging two strings such that the result is lexicographically minimal. Formally, a merge of two strings a and b is a string s of length |a| + |b| such that there exist two strictly increasing sequences of indices i1, i2, ..., i|a| and j1, j2, ..., j|b| such that a = si1si2... si|a|, b = sj1sj2... sj|b| and each index in s appears exactly once in i1, ..., i|a|, j1, ..., j|b|.

The above mentioned editorial provides an algorithm for solving this problem that works in time and uses hashes. Actually, this problem can be solved in linear time. The solution works roughly like this: maintain current position pa in a and pb in b. On each step, lexicographically compare the suffix of a starting at pa with the suffix of b starting at pb, and take a character from the suffix that is smaller (actually, for this to work, it is necessary to terminate each string with a character that is greater than any character in the strings, so that if one of the suffixes is a prefix of the other, the shorter suffix is considered larger, not smaller). The author proposes to compare the suffixes by using binary search and hashing, which takes time. However, this can be done in constant time.

Actually, this is a well known Longest Common Extension problem. One of the constant-time solutions is as follows: construct a suffix tree from the strings, then preprocess it using one of Lowest Common Ancestor algorithms that can answer LCA queries in constant time. It is easy to see that the lowest common ancestor of two leaves in a suffix tree that correspond to two suffixes can be used to find the length of the longest common prefix of those suffixes. From that, performing lexicographical comparison is easy.

It is possible to build and preprocess a suffix tree in linear time, so the overall running time is O(n), but the algorithm is quite complex. Does anyone know of a simpler algorithm with the (asymptotically) same running time?

Full text and comments »

  • Vote: I like it
  • +68
  • Vote: I do not like it

By eatmore, history, 7 years ago, In English

Finally, TopCoder announced the dates of TopCoder Open 2017 Algorithm and Marathon Competitions. Since it is not trivial to find this information on their website, I will reproduce it here.

TCO17 Algorithm Competition will have a usual structure with three online rounds and two onsite rounds. The location and the dates of onsite rounds have yet to be announced, but the dates of online rounds are already known:

This year, 750 top contestants will advance from each sub-round of Round 1, 40 will advance from each sub-round of Round 2, and five from each sub-round of Round 3. Also, 250 TopCoder members with the highest rating advance to Round 2 automatically, as long as they competed in at least three rated TopCoder Algorithm rounds in total and in at least one such round between January 1 and Marth 31, 2017.

In addition to these online rounds, there will be six regional onsite rounds. To compete in any of them, it is necessary to be present at the event. These events are currently planned:

  • Regional event in Austin, TX: April 29, 2017.
  • Regional event in Saint Petersburg, Russia: May 7, 2017 (third year in a row).
  • Regional event in Beijing, China: June 24, 2017 (second year in a row).
  • Regional event in Bangalore, India: August 20, 2017.
  • Regional event in Warsaw, Poland: September 2, 2017.
  • Regional event in Pittsburgh, PA: September 7, 2017.

From each of these rounds, 10 top contestants will advance to a special Wildcard Round, which will be held on September 10, 2017 at 16:00 UTC. From this round, two highest-scoring contestants will advance to the onsite round. So, in total, 12 contestants will advance to TCO17 Algorithm onsite round.

In TCO17 Marathon Competition, there will be three regular online rounds plus some number of Lightning Rounds. The dates for the regular rounds are as follows:

In each regular round, top 30 contestants will be awarded points based on their place. Lightning Rounds, of which none is currently announced, will award fewer points. Top ten contestants who accumulate the most total points will advance to the onsite round.

Full text and comments »

  • Vote: I like it
  • +130
  • Vote: I do not like it

By eatmore, history, 8 years ago, In English

TopCoder Open 2016 Round 2C starts today at 17:00 UTC. Top 40 contestants will advance to Round 3. This is the last chance to advance. Those who have already advanced will be able to compete in a parallel round.

Good news for those who participate in IPSC: TopCoder has apparently decided to move this round so that it doesn't clash with it. Don't forget to register in time, registration closes five minutes before the round.

Full text and comments »

  • Vote: I like it
  • +39
  • Vote: I do not like it

By eatmore, history, 8 years ago, In English

Facebook Hacker Cup 2016 is starting soon. Don't miss the qualification round, which starts at midnight UTC and lasts for 3 days. To advance, you will need to solve at least one problem.

This year's finals will be in London, so this is another chance for those who missed GCJ finals in 2013.

You can enter the round using this link, but you need to log into Facebook first.

Full text and comments »

  • Vote: I like it
  • +218
  • Vote: I do not like it

By eatmore, history, 9 years ago, translation, In English

This year's TopCoder Open includes, in addition to onsite final round, four onsite events, which take place in various cities around the globe simultaneously with the sub-rounds of round 2. As a result, the times for these rounds become known later than usual. The times for rounds 2A, 2B and 2D have already been announced, and now the time for round 2C is announced as well.

Round 2C will take place on July 18th in Tokyo, at the office of Dwango Co.

Kabukiza Tower

Like on the other onsite events, there will be a hackathon and t-shirts. Unlike the other onsite events, there will be round 2 explanation by iwiwi and rng_58. The event will begin at 11:00 AM local time, and the round itself will start at 3:00 PM (6:00 AM UTC). There will be a parallel round for onsite participants who didn't advance to round 2, as well as for everyone who have already advanced to round 3. If you plan to participate in the onsite event, don't forget to register, because just 100 participants would be able to do it.

As a reminder, all onsite events are optional. If you advanced to round 2, you can participate online.

Full text and comments »

  • Vote: I like it
  • +64
  • Vote: I do not like it

By eatmore, 9 years ago, translation, In English

TopCoder announced the dates of TopCoder Open 2015 rounds 2B and 2D, as well as the details of the corresponding regional events. Round 2B will take place on June 20th in San Francisco, at MemSQL headquarters.

Full text and comments »

  • Vote: I like it
  • +37
  • Vote: I do not like it

By eatmore, 9 years ago, translation, In English

Yandex.Algorithm 2015 Qualification Round begins soon. It is the last chance for those who didn't participate in the warm-up round or haven't solved at least one problem to advance to the elimination rounds, which will take place on May 24th and 30th and on June 6th.

The round will last 100 minutes and will be a virtual contest: each participant will be able to choose start time in the period between May 16th 21:00 and May 17th 21:00 UTC. This means that some participants may potentially be competing until 22:40 UTC, so please don't discuss the problems until that time. To advance to the elimination round, it is necessary to solve at least one problem.

Full text and comments »

  • Vote: I like it
  • +66
  • Vote: I do not like it

By eatmore, 9 years ago, translation, In English

TopCoder announced recently that they are planning regional onsite events coinciding with TCO 2015 round 2. Now it is known that the first of these events, round 2A, will be held on May 31st in Saint Petersburg, Russia, at ITMO University.

ITMO University

In addition to the round itself, the schedule includes a hackathon with $5000 in prizes. The first 150 attendees will receive t-shirts (registration is required). The event will start at 9:00 AM Moscow time, and the round itself will start at 3:00 PM (12:00 PM UTC). Those who will not advance to round 2 will be able to compete in a parallel round. If you would like to participate in the hackathon, you will need to register no later than May 28th (Moscow time).

By the way, it is already possible to find the locations of the other onsite events: round 2B will take place in Tokyo, round 2C in San Francisco, and round 2D in Jaipur, India.

Full text and comments »

  • Vote: I like it
  • +100
  • Vote: I do not like it

By eatmore, 9 years ago, translation, In English

Russian Code Cup 2015 WarmUp Round will take place today at 10:00 UTC. Results of this round won't affect subsequent participation in RCC 2015, so this round can be viewed as a training before the qualification rounds. The contest lasts 2 hours, problem statements will be in Russian. The qualification rounds will take place on March 28th, April 25th and May 31st.

Full text and comments »

  • Vote: I like it
  • +13
  • Vote: I do not like it

By eatmore, 9 years ago, translation, In English

The third round of Facebook Hacker Cup 2015 will take place exactly one week after round 2: on January 31st at 9:00 PM UTC. The round will last 3 hours. Top 25 participants will win a trip to Menlo Park to participate in the final round, which will take place at Facebook office on March 6th.

Participants will be able to enter the contest using this link, and the scoreboard will be available to everyone here.

Full text and comments »

  • Vote: I like it
  • +114
  • Vote: I do not like it

By eatmore, 12 years ago, translation, In English

Google Code Jam Round 3 starts today at 14:00 UTC. Top 25 contestants will win a trip to New York City for a final round (they will also get their T-shirts a bit earlier).

Full text and comments »

  • Vote: I like it
  • +71
  • Vote: I do not like it

By eatmore, 12 years ago, translation, In English

ICPC Challenge will start today. ICPC Challenge is an additional contest for ICPC finalists where they have two weeks to solve a single game problem. After that, a double-elimination tournament will be held between the team's submissions. The results will be announced at the finals. The teams who take the top places will be awarded prizes.

Solutions in C++ and Java are accepted. Unfortunately, participating out of competition is not permitted. However, statements are available to everyone. ACM recently offered an open contest based on the last year's problem, but it is already over.

Full text and comments »

  • Vote: I like it
  • +48
  • Vote: I do not like it