microtony's blog

By microtony, history, 9 years ago, In English

I noticed that there are a lot of new users participated in the Technocup 2016 Round 1 (only visible via Russian locale) and many of them ranked pretty low.

The average rating increase for returning participants is around 50. (Sum of rating change is around 13000)

If we assume there are 25000 active codeforces users, and we distribute those "extra rating" to every user, that means every user gained 0.5 rating just because of this contest.

This article states that one of the cause of inflation could be players received a too high initial rating.

Thoughts?

Full text and comments »

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

By microtony, history, 10 years ago, In English

Unable to parse markup [type=CF_MARKDOWN]

Full text and comments »

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

By microtony, history, 10 years ago, In English

UPD: arti commented that they will be using Oracle JDK. Thanks!

I maintain a online judge which uses the CMS isolate sandbox. I was trying to support Java so I looked at CMS itself, and found that they are using gcj (GNU Compiler for Java) as you can see in this commit.

https://github.com/cms-dev/cms/commit/cf949952424677e0b0762eec5e461e33f85eecb3

Of course this doesn't mean they will definitely use gcj and we should wait for their announcement. Disclaimer: I am not a IOI participant nor use Java in competitive programming. But I don't think they will support OpenJDK/Oracle as I (almost always) get memory allocation error when running JVM within isolate sandbox.

gcj is the default java installation in Ubuntu. So far I faced two bugs. (These bugs are related to I/O and since IOI uses interface file so it may not be a problem.)

1) Formatted floating point numbers will become empty

public class Task {
  public static void main(String[] args) {
    System.out.format("$%.3f\n", 0.9876);
  }
}
Expected output: $0.988
Program output: $

2) Scanner class does not work with Scanner.in.read(). Even if you are trying to scan integers only, you have to press enter several times. This does not happen when you use file redirection.

import java.util.*;
import java.io.*;
public class Task {
  public static void main(String[] args) throws IOException {
    Scanner in = new Scanner(System.in);
    System.out.print((char) System.in.read());
    System.out.println(in.nextInt());
  }
}
Input: A5
Expected Output: A5
Program: 
(strange character)Exception in thread "main" java.util.InputMismatchException: "A5" is not an integer
   at java.util.Scanner.myNextInt(libgcj.so.15)
   at java.util.Scanner.nextInt(libgcj.so.15)
   at java.util.Scanner.nextInt(libgcj.so.15)
   at Task.main(Task.java)

Full text and comments »

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