Блог пользователя codefforces

Автор codefforces, история, 4 года назад, По-английски

By default, submissions for a problem are shown in the increasing order of solution size. (Example). Why solution size, of all things?

This becomes annoying when I want to look at some readable submissions for a problem. Look at the the first entry, from the above example. No line breaks whatsoever. The code seems to be specifically tailored to top this list. No offence, it's their choice.

But as a user, I think order by submission time would be more natural and helpful. That would first list the code of the contest toppers. Given their consistency, it becomes a lot easier to find their solution to almost any problem.

At least, is there an option in the settings to change the default behavior, that I might have overlooked?

Полный текст и комментарии »

  • Проголосовать: нравится
  • -18
  • Проголосовать: не нравится

Автор codefforces, история, 4 года назад, По-английски

Problem: https://mirror.codeforces.com/contest/1459/problem/C

The algorithm is all about computing gcd of large integers, $$$4⋅10^5$$$ times. Haskell it seems is too slow for even this!

C++ code passes in ~ 1.3 sec.

But Haskell code exceeds TL (2 sec).

Switching from Integer to Int64 does not help a bit. Disappointing.

Any ideas on optimizing it?

Update: It turns out that the string based IO was slow. Using of Data.Text.IO fixed it.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +11
  • Проголосовать: не нравится