Comments
On Sereja → Codeforces Round #182, 14 years ago
0

I also ran it locally and it took 8.1 seconds... looks like the judge was correct and I should use faster IO functions if any. Thank you for pointing it out.

On Sereja → Codeforces Round #182, 14 years ago
0

I tried Div2 A and B with Go language but both solutions got TLE in pretests. (my solutions: 3675888, 3676731) I feel more optimization is needed for those new languages.

Thank you, it works fine now :)

Very nice tutorial! But I have a problem. When I try to open some of the example codes in the tutorial (astep's Div2A for instance), I got "You are not allowed to view the contest" message and could not view the codes. Is there something wrong?

You output '\0' or something in printf("%c", s[k]). j can be equal to s.length(), and k can be equal to j.

edit: oops I didn't notice your blog post

On I_love_Nastya → Codeforces Round #138, 14 years ago
0

Perhaps you are pop()ping too many elements when kt.size()==0? Here's a smaller failing test case: [[[]]])

On I_love_Nastya → Codeforces Round #138, 14 years ago
+3

Try this input:

5 3
1 2 1 2 3

The output should be 3 5, but yours was 1 5.

0

I think it caused by roundoff errors and/or c++ optimization. Those who complained this problem in the forum use the cmath function pow(double,double), which can cause roundoff error in some environment, even though the parameters are integers.

And, when I ran dragonfire's code with some additional std::cout for debug, then extra '23' is disappeared (see my submission: 1170942).
This is sooo strange, but probably it suppressed the compiler optimization and the calculation became correct

0

See this page: http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#parseInt(java.lang.String, int)

It does check base <= 36 (Character.MAX_RADIX == 36 in Java 6), and you can't modify it.