megaspazz's blog

By megaspazz, history, 3 weeks ago, In English

I have always been curious about my ranking in the leaderboard as a function of time, since I have always suspected that I am rather slow on easy problems.

To learn Angular, I built a web app that displays your ranking throughout any given contest.

If you are interested, please give it a try: https://megaspazz.github.io/CodeRank/

As of now, it works with normal CF rounds and ICPC-style rounds; it should probably work with IOI-style contests, but they seem to be rare on Codeforces. It doesn't really work for marathon-style contests.

Example screenshot: Example screenshot

Some notes:

  1. Codeforces API sometimes doesn't report hacks for contests, for example API link for Codeforces Round #576 (Div. 1) seems to always report an internal error.
  2. It's hosted serverless on Github pages, so I manually pre-process all of the contests so that the JSON only contains data the app needs and it avoids hitting the Codeforces when people use the app.

Full text and comments »

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

By megaspazz, history, 4 months ago, In English

I saw in the comments of Codeforces Round #823 (Div. 2) that many C++ users needed to use setprecision to get AC on problem B. Fortunately, as a Java user, I didn't face the issue this time, but it made me wonder: what are some "gotchas" that people who are newer to competitive programming should look out for?

I also recall that in last year's FB HackerCup, where we need to run code locally, a friend of mine who uses C++ didn't set their local stack size high enough and therefore couldn't successfully run their otherwise-correct code on the full input set.

I know for Java, I painfully learned early on that Java's sort routines on primitive arrays have worst case O(n^2) runtime using a Quickselect variant, and that very smart hackers can construct adversarial inputs that cause a Java solution to get TLE.

So, in your experience, what are some things that have tripped you up?

Full text and comments »

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