abacabadabacaba's blog

By abacabadabacaba, history, 5 weeks ago, In English,

Google Code Jam 2019 Round 2 will begin at 14:00 UTC. Top 1000 participants will advance to Round 3 and win a t-shirt.

Note that there will be no Distributed Code Jam this year.

Let's discuss the problems after the round is over.

Read more »

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

By abacabadabacaba, history, 2 months ago, In English,

This post in Code Jam group

Hi,

I want to discuss interactive problems in Code Jam. Code Jam didn't have interactive problems until recently, and there are still major differences between interactive problems in Code Jam versus the other competitions where interactive problems are more established.

One difference is in how sample interactions are presented. I think that in Code Jam, sample interactions are very inconvenient to read. For regular input and output, there is a place where you can read just the input and just the output, but for interactive problems, you have to read a mix of pseudocode, comments and the actual input/output.

Other competitions that have interactive problems usually use more concise formats, which are easier to read quickly. One possibility is to just present the input and the output separately, like here (problems H and I). This doesn't convey the relative order of the input and output lines, but it can be reconstructed from the description of the interaction protocol. Also, it is possible to use empty lines to show the order, like here (problem C). There are multiple approaches that can be used to show a sample interaction in a single column, like showing input and output lines in different colors, or prefixing them with different symbols (for example, left and right arrows). In all cases, it is possible to add an additional column for comments.

Another feature of interactive problems specific to Code Jam is that when a solution produces an incorrect result, the judge program will communicate this to the solution and wait for it to terminate. This doesn't make sense. Once the solution produces an incorrect result, there is no point in continuing to run it, and in other competitions, it would be immediately terminated in such a situation. But apparently Code Jam team expects the contestants to write code that would check the judge's output and handle the case where it indicates that the solution's output is incorrect. This is useless, because it wouldn't make any solution pass that wouldn't pass otherwise, and that's all that matters for a solution. I for one don't write such code (my solutions always skip this part of the judge's output), but I still need to not forget to read (and ignore) that line, something that I don't have to do in other competitions.

Finally, I'd prefer sample interactions to be correct. It's simple: for regular problems, sample inputs and outputs are (almost) always correct, so why should it be any different for interactive problems? Yet, both of this year's interactive problems available so far have sample interactions where a solution provides an incorrect answer, apparently to demonstrate the judge's response to it (the right response, as I already said, is to terminate the solution with WA verdict).

What do you think of all this?

Read more »

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

By abacabadabacaba, history, 2 months ago, In English,

It was recently announced (in Russian) that Yandex.Algorithm will not be held this year. It is sad to see another great competition disappear.

Read more »

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

By abacabadabacaba, history, 2 months ago, In Russian,

Чемпионат по программированию — новое соревнование, проводимое компанией Яндекс. На самом деле оно не совсем новое, а является продолжением соревнования Яндекс.Блиц, которое проводилось последние два года.

Принять участие в чемпионате могут все граждане России, Белоруссии и Казахстана, которым уже исполнилось 18 лет. Каждый участник должен выбрать одно из четырёх соревнований: по фронтенд-разработке, бэкенд-разработке, машинному обучению или аналитике данных. Победители каждого из соревнований получат призы: 1 место — 300 тысяч рублей, 2 место — 150 тысяч рублей, 3 место — 100 тысяч рублей, первые 3 — Яндекс.Станции, первые 20 — сертификаты и футболки. Первые 20 участников получат приглашения в московский офис Яндекса — на экскурсию и собеседование (с оплатой проезда и проживания).

Расписание соревнования:

UPD Перед соревнованием можно потренироваться на задачах Яндекс.Блицев прошлых лет:

Read more »

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

By abacabadabacaba, history, 3 months ago, In English,

Google Code Jam 2019 Qualification Round will start on April 5 at 23:00 UTC and last for 27 hours. Here is the official announcement:

Hi everyone,

Code Jam is back for its 16th year, kicking off with the Qualification Round in one week! We're excited to provide you with another season of intriguing problems (including some interactive ones) and a refreshed user experience. Register today for a chance to earn the coveted title of Code Jam Champion at the World Finals in San Francisco, California, and take home the grand prize of $15,000.

Here’s what you need to know about this year’s competition:

  • The 27-hour Online Qualification Round begins on Friday, April 5 @ 23:00 UTC; registration will be open from now until the round ends.
  • Registration is now a two-part process: first, you'll create a coding competitions profile, then you'll be prompted to complete registration for Code Jam specifically. Make sure you complete both steps and lookout for a registration confirmation in the "Alerts" section of our site.
  • We hope you enjoy new and familiar features alike such as "ask a question," testing your solution on our servers, and receiving a participation certificate. You'll receive a certificate after the last round you participate in (so long as you make at least one competitive attempt during the Qualification Round.).
  • The top 1,000 contestants in Round 2 win a limited edition Code Jam t-shirt.
  • You can start warming up with previous Code Jam problems.

Visit g.co/codejam to register and review the updated Code Jam FAQs, Rules and Terms. See you on the scoreboard!

P.S. Spread the word about #CodeJam with these resources: Code Jam video, 2019 flyer and a Google Keyword blog post.

And another one:

Reminder: the 2019 Code Jam Qualification Round begins later today. We have a few exciting updates and helpful reminders to share:

  • We've made several updates to our FAQ, and are proud to offer 20 additional languages this season! Please review all of the FAQ sections before the round — especially "Competing," "Coding," and "Interactive Problems", which contain important details about supported languages, updated tools and testing on our servers

  • The round will be open for 27 hours, starting April 5 at 23:00 UTC and ending April 7 at 2:00 UTC. You can spend as much or as little of the 27 hours competing as you would like, but you must attain a final score of at least 30 points to move on to Code Jam’s Round 1. If you're a new competitor who is comfortable with programming, the odds are good that you will be able to earn enough points to advance within a few hours.

  • You can prepare by: working through past problems, reviewing the Code Jam FAQ & Rules and Terms. If you have questions during the round, use the "Ask a Question" feature in the competition interface. If you can't find an answer in the FAQ or Rules, reach out to codejam@google.com.

Good luck!

The Code Jam Team

This year, Code Jam has a new competition interface. To register for Code Jam, you will have to first create a profile in the new system (even if you participated in the previous years), and then to register for the Code Jam itself.

Also, the list of supported languages was significantly expanded. The supported languages are: Bash, C, C++, C#, Clojure, Dart, F#, Go, Groovy, Haskell, Java, JavaScript, Julia, Kotlin, Lisp, Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python 2, Python 3, PyPy 2, R, Ruby, Rust, Scala, Swift, TypeScript, and Visual Basic.

You may want to read some useful posts about Code Jam:

Good luck & have fun!

Read more »

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

By abacabadabacaba, history, 3 months ago, In English,

At least, it's their policy:

Just so you and everyone else is aware, we have the policy of not monitoring CJ feedback on any external (to Google) forum. If you or someone you know has feedback that can/should be actioned, please ask them to either use this list or contact us privately at codejam@google.com. They can also use our social channels, but it's a less efficient form of communication for system-type feedback.

So, it you have a technical problem during the upcoming Qualification Round, rather than posting it here on Codeforces, email it to codejam@google.com. Or do both.

Read more »

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

By abacabadabacaba, history, 4 months ago, In English,

This post in Code Jam group

Hi all! This year, Google has again decided to change Code Jam user interface. The new interface has already been used for Code Jam to I/O for Women and Kick Start rounds, and from what I saw, it is even worse than the last year. Let's start.

This is what I saw when I opened Code Jam main page. This year it uses even longer domain name, codingcompetitions.withgoogle.com, and some text seems to be missing. After some investigation, I found that this occurs when a browser is configured to block third-party cookies. I configure my browser this way because I don't want some companies to track me around, and for nearly all sites, this causes no issues. On some sites, blocking third-party cookies causes single sign-on to stop working, but this is understandable. Code Jam website is the first one that I saw such that blocking third-party cookies breaks it so much that you can't even read text (note: looks like this have been fixed, and now the website displays a warning instead).

After getting the text to appear, I struggled with some login problems and finally got to the competition interface (this screenshot was taken after the round, but it looked almost like that during the competition as well):

Usually, when you enter a round, you expect to see the problems. This year, you start a round with a scoreboard. To get to the problems, you need to click one of the "Open problem" buttons. Doesn't matter which one: you would be able to switch between problems from the dashboard. Here it is:

As you see, in this new version there is a code editor that always takes half of your screen space. No way to resize or hide it. Doesn't matter if you want to use it or not. I, for instance, prefer to use a real IDE, because it has syntax highlighting and completion and refactoring and I can run the code locally and IT DOESN'T FORCE ME TO USE WHITE TEXT ON BLUE BACKGROUND. Also, in the old interface, there was a side bar for switching between problems, and in the older version it also showed submission statistics and the number of new announcements, but now this is all gone.

Side note: suppose that you just want to read the problems, and all you got is a tablet.

Sorry, the editor, despite being completely useless, still wastes half of your screen space. Also, looks like the problem name doesn't fit into the provided space.

Back to the previous screen.

Do you see a submit button? Me neither. It took quite some time for me to realize that to be able to submit your solutions, you have to register TWICE: once to enter your information into the new website, and once more to actually register for the competition. Otherwise, you can type the code, but the panel with submit button (and a couple of other buttons) is hidden. After I registered properly, the panel appeared (but my code disappeared, fortunately, I had it saved to a file). Then I could finally submit it.

Now, back to the scoreboard.

This is the scoreboard of this year's Code Jam to I/O for Women round. It has four problems, but you can only see three at a time. Apparently, the person who designed this is as bad in using your screen space as Windows 10 is in using your RAM. Perhaps they should learn from guys who designed this:

The old version easily fits six problems, and has space for one or two more. And even the font size is almost the same! Now, on top of the scoreboard, there are some big useless graphs. To see the actual scoreboard, you have to scroll down. For comparison, the old interface displays submission statistics below the scoreboard, as an additional row. Codeforces is doing the same.

Another change is the number of rows you can see on a single scoreboard page. On Codeforces, you can see up to 200 rows at once, which is reasonable for a round with several thousands of participants, and works for smaller rounds as well. In the old Code Jam interface, it was possible to see 30 rows at once. Now, there is a selector that switches between 10 and 20, and it doesn't even work until you switch between pages (looks like this had been fixed recently).

Here is another example of a well designed scoreboard:

Also, as I scroll the scoreboard, I have about 40% of my screen covered by the heading which doesn't scroll, which is way too much.

Now about round overview and problem analysis. Instead of being in a single convenient place, this information is now sprinkled around the interface. To see the overview, you need to click a slider on top of the scoreboard, and the overview will appear in place of those big useless graphs. To see the analysis, go to a problem and click an analysis "tab" above the text. Again, I like the old version so much more.

All in all, the new interface is worse than the old one in nearly every respect. So, what can be done to make it better? Here are some suggestions:

  1. Looks like Code Jam team already noticed that some people block third-party cookies, and made the website show a warning in this case. Still, it would be awesome if it were possible to actually log in without third-party cookies or, at least, with first-party isolation (currently, no warning is shown in this case, but login doesn't work).
  2. When entering a round, users should be directed to the problems, not to the scoreboard. This is how it worked in all previous versions, and this is how it should work. Also, the old version had a nice feature: it was possible to open the dashboard in advance of the round, and have the problems load automatically when it starts. I'd like to have this feature in the new version as well.
  3. Something has to be done with the code editor. Perhaps it should be put below the problem statement, or into a separate tab. I would also suggest to allow those users who don't need an editor to hide it completely, and to switch to an interface that supports submitting only from a file (this is how it was done before 2018).
  4. The editor should not be displayed if the user is not logged in, or not registered for the round. Instead, they should see a message stating that. Currently, a message is displayed in an editor, and only if the user is not logged in.
  5. There should be a sidebar on the left, with tabs for switching between the problems. It may show additional information as well. The old version had submission statistics and a mini-scoreboard in a sidebar, which I find quite useful.
  6. In the new interface, there is a top bar, which doesn't scroll. I think that it is not useful enough to always be on the screen, so it should be made to scroll with the page.
  7. There should be an option to receive desktop notifications when a submission is judged. Also, there should be notifications when there is an announcement, and when problem statement is changed. During the previous years, there were multiple occasions when problem statements were changed during the round without any notification whatsoever, and it was necessary to reload the page to see the changes.
  8. The scoreboard should be made to look better. It should be made to show more than three problems at once, and preferably at least 100 rows per page. Submission statistics should appear below the scoreboard, not above. The part of the header that remains on the top of the screen while the page is scrolled should be at most as tall as a single row.
  9. Round overview should be on its own page, not tucked above the scoreboard.
  10. Switching between the problems and the scoreboard should be more straightforward. Currently, to switch to the scoreboard, you have to press a left arrow in the top left corner of the screen, which is pretty unintuitive. The old "Contest scoreboard"/"Contest dashboard" links are much better.

Read more »

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

By abacabadabacaba, history, 4 months ago, In English,

The times of (most of) TCO19 Algorithm rounds has been published. Here they are:

Also, here are the times of TCO19 Marathon rounds:

Read more »

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

By abacabadabacaba, history, 7 months ago, In English,

Google Code Jam 2019 has been announced. You may read the schedule. To register, you'll have to wait until March 5.

Unfortunately, there will be no Distributed Code Jam in 2019. I think that this has something to do with DCJ platform not receiving any substantial updates for the last three years. Maybe people who made it have already left, and no one can keep it working. It will be sad if this year's Distributed Code Jam is going to be the last.

Read more »

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

By abacabadabacaba, history, 9 months ago, In English,

Previous posts: Java 8, Java 9, Java 10.

Java 11 has been released a few days ago. This post lists some improvements in this version that are useful for competitive programming.

  • New String methods: String.strip(), String.stripLeading(), String.stripTrailing(), String.isBlank() and String.lines() can help with parsing, while String.repeat() can be used to generate output.
  • StringBuilder and StringBuffer instances are now Comparable. Also, CharSequence.compare() can be used to compare String, StringBuilder and StringBuffer values without conversion.
  • Null streams: InputStream.nullInputStream(), OutputStream.nullOutputStream(), Reader.nullReader() and Writer.nullWriter() might be useful for testing.
  • It is now possible to run source files directly: java Solution.java.

As before, if you find any other relevant enhancements, please post them here.

Read more »

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

By abacabadabacaba, history, 10 months ago, In English,

Distributed Code Jam 2018 final round is already running. You can watch the scoreboard here. It's strange that no one wrote about it earlier.

Read more »

Tags dcj
 
 
 
 
  • Vote: I like it
  • +61
  • Vote: I do not like it

By abacabadabacaba, history, 12 months ago, In English,

Distributed Code Jam 2018 round 1 starts on Sunday, June 10th at 14:00 UTC and lasts 3 hours. This round is open for everyone who advanced to round 3 of the regular Code Jam. Top 20 contestants will earn a trip to the final round in Toronto.

This year, Google will use the old contest system for Distributed Code Jam rounds. Only C++ and Java are supported, and the versions of compilers used are ancient: GCC 4.7.2 for C++ and Java 7. Beware that GCC 4.7.2 was released in 2012 and doesn't support many new C++ features. If you are using Java, your main class must be named Main, not Solution.

As some people found out, you must have registered for Distributed Code Jam, but it wasn't required if you already had your data in the old system. In any case, you may visit this page to check that your data is there.

Read more »

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

By abacabadabacaba, history, 13 months ago, In English,

Google Code Jam 2018 round 3 starts on Saturday, June 9th at 14:00 UTC and last 2.5 hours. Top 25 contestants will earn a trip to the final round in Toronto.

Also don't forget about Distributed Code Jam round 1, which starts a day later.

Read more »

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

By abacabadabacaba, history, 13 months ago, In Russian,

В своём предыдущем посте я рассказал, что знаю, как работает Flash-компонент Codeforces для показа решений во время контеста, и собираюсь рассказать другим. Не для того, чтобы эту информацию использовали для нарушения правил, а чтобы в контестах можно было участвовать наравне со всеми без Flash. Реакция со стороны администрации была весьма болезненной — как будто я собираюсь сломать Codeforces, то есть сделать так, чтобы он не мог нормально работать. Я не согласен с подобной оценкой. Более того, я сомневаюсь, что те усилия, которые прикладывает Codeforces для защиты кода решений от копирования, вообще оправданы.

Я считаю, что когда MikeMirzayanov придумывал систему защиты от копирования кода (или оценивал, если эту систему придумал кто-то другой), он совершил две ошибки. Первая из них чисто техническая: он решил, что то, что алгоритм шифрования реализован с помощью Flash, само по себе является серьёзным препятствием для реверс-инжиниринга. Никакой другой защиты там нет: алгоритм очень простой, код легко читается, а для расшифровки не нужно даже знать ключ. Как я уже писал, это не работает — декомпиляторы для Flash легко находятся в Google. Так что почти никакой реальной защиты и не было, только видимость защиты.

Вторая ошибка скорее стратегическая: в попытке сделать систему максимально защищённой MikeMirzayanov решил пожертвовать удобством участников и продолжал настаивать на своём решении, даже когда участники неоднократно озвучивали своё несогласие. Ни для кого не секрет, что полностью исключить возможность читерства на соревнованиях невозможно. Особенно это касается онлайн-соревнований, где есть методы читерства, которые просто реализовать и сложно предотвратить. Например, совместное участие в личном контесте нескольких человек под одним аккаунтом. По сравнению с этим варианты читерства, которые возникают в результате возможности копировать код, не выглядят захватывающими: чтобы читать чужой код, необходимо уже иметь своё решение, которое проходит претесты, а значит, идею решения всё равно нужно придумать самому (да и, чтобы понять идею чужого решения, не нужно его никуда копировать — достаточно его прочитать). А чтобы использовать скопированный код чужого решения для взломов, нужно не только уметь его запускать, но и иметь нетривиальные тесты — ведь это решение уже прошло претесты. В общем, нужно достаточно много возни, а в результате на одних взломах всё равно далеко не уедешь.

При планировании системы защиты стоит предполагать, что большинство участников не будут пытаться нарушить правила, по крайней мере, преднамеренно. Потому что если это не так, то у сообщества серьёзные проблемы, которые не решить техническими средствами. Так что большинство участников вообще не будет пытаться скопировать текст решений, некоторые могут попробовать просто его выделить и скопировать (возможно, не зная, что это против правил — кто же их читает?), отдельные участники могут попробовать влезть в инструменты разработчика. Но если кто-то дошёл до того, чтобы вытаскивать текст, рисуемый на canvas-е, то у меня для вас плохие новости: он действительно хочет скопировать код, и он его скопирует. Потому что аналоговая дыра остаётся всегда, OCR — это не rocket science, а склеить изображение всего кода из видео его прокрутки — если подумать, то не такая уж и сложная задача.

Исходя из вышесказанного, я считаю, что нынешняя система на основе Flash в целом не приносит пользу. Да, она может не дать небольшому количеству участников считерить, но для большинства она создаёт неудобства. Целевой аудиторией Codeforces являются честные участники, так что о них нужно думать в первую очередь. В этом плане показателен пример TopCoder: их браузерная арена не использует Flash, и код оттуда извлекается вводом одной строчки в консоль. Их Java-арена вообще передаёт код открытым текстом — бери и копируй. И при всём при этом у них, судя по всему, нет серьёзных проблем с читерами (иначе бы они что-нибудь изменили). Лично мне их подход нравится намного больше.

Read more »

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

By abacabadabacaba, history, 14 months ago, In Russian,

Всем привет. Я решил ещё раз поднять тему Flash Player в контексте его использования на Codeforces для взломов.

Эту тему уже поднимали неоднократно, давно и не очень. Все ответы администрации сводились к двум утверждениям: что Flash работает и что систему, основанную на Flash, трудно обойти. Оба эти утверждения ‒ ложь.

В последнее время я несколько раз пытался смотреть код других участников во время контеста, и у меня не разу не получилось. Каждый раз показывалось что-то такое. При этом я использовал последнюю версию Flash. При этом процесс plugin-container, в котором работает Flash, падал с необработанным исключением (SIGSEGV). Это то, что может произойти, если, например, решение задачи на C++ выходит за границы массива. Видимо, Flash Player по качеству кода недалеко ушёл от таких решений.

При таком качестве кода не удивительно, что у Flash плохо с безопасностью. MikeMirzayanov, конечно, скажет, что уязвимости есть не только в Flash. Но если в Chrome или Firefox найдут уязвимость, которая будет активно эксплуатироваться, то Google и Mozilla выпустят обновление как можно быстрее, а Adobe (как и Microsoft) будут ждать до следующего планируемого выпуска патчей (патчи выпускаются во второй вторник каждого месяца). Кроме того, использование Flash добавляет все его уязвимости к тем, что уже есть в браузере (это одна из причин, по которой браузеры отказываются от поддержки вообще всех плагинов, а не только Flash).

В общем, как я уже написал, Flash небезопасен. Flash не работает ‒ по крайней мере, под Linux. Из-за лицензионных ограничений, Flash под Linux нельзя скачать из репозитория, нужно качать и ставить обновления вручную (но это не важно, так как он всё равно не работает). Можно, конечно, специально для взломов использовать виртуальную машину с Windows (там Flash работает), но это неудобно. Я считаю, что необходимость в подобных действиях для полноценного участия в контестах ‒ свинство со стороны администрации.

Даже когда Flash работает, основанный на нём интерфейс для чтения кода, мягко говоря, оставляет желать лучшего. Код приходится читать в окошке посередине экрана, набранный корявым шрифтом, а прокрутка ‒ это вообще извращённый садизм. Да чтоб тот, кто это поделие придумал, до конца жизни писал код только через такой же интерфейс!

И наконец: MikeMirzayanov почему-то считает, что новички для того, чтобы нарушить правила, с лёгкостью установят Firebug, но при этом не додумаются установить декомпилятор для Flash. Так вот: декомпиляторы для Flash существуют, их легко найти, и первый же найденный декомпилятор легко декомпилирует Flash-файлы с Codeforces. И я удивлюсь, если ещё никто ни разу не копировал чужой код через функцию взлома. Впрочем, если это и так, то это скорей говорит о честности участников.

Теперь к главному. Я изучил, как работают Flash-файлы с Codeforces и, в частности, как они расшифровывают решения. Я собираюсь выложить эту информацию, чтобы показать, что «защита» на основе Flash не имеет преимуществ перед «защитой» на основе Javascript, и таким образом подтолкнуть администрацию к тому, чтобы отказаться от Flash. Также я сделал расширение для Chrome и Firefox, которое позволяет читать код без Flash. Его я тоже собираюсь выложить. Так или иначе, я избавлю себя и других участников от необходимости держать Flash ради Codeforces. Других сайтов, где без Flash что-то не работает, я не встречал уже давно.

UPD Продолжение: Почему Codeforces не нужен Flash.

Read more »

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

By abacabadabacaba, history, 14 months 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.

Read more »

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

By abacabadabacaba, history, 15 months 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?

Read more »

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

By abacabadabacaba, history, 15 months 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.

Read more »

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

By abacabadabacaba, history, 15 months 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.

Read more »

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

By abacabadabacaba, history, 21 month(s) ago, In Russian,

Иногда в таблице результатов появляются непонятные вещи:

Причём возникает это недетерминировано и при обновлении страницы пропадает. У кого-нибудь ещё такое бывало?

Read more »

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

By abacabadabacaba, history, 22 months 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).

Read more »

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

By abacabadabacaba, history, 2 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?

Read more »

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

By abacabadabacaba, history, 2 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.

Read more »

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

By abacabadabacaba, history, 3 years ago, In Russian,

... испытываю я после второго полуфинала TCO16.
С одной стороны, я не прошёл в финал. Это плохо.
С другой стороны, я выступил лучше, чем tourist. Это хорошо.

Read more »

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

By abacabadabacaba, history, 3 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.

Read more »

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