### Betlista's blog

By Betlista, 4 years ago, ,

In SRM there were 1303 registered participants

By Betlista, 4 years ago, ,

In SRM there were 1413 registered participants

•
• +30
•

By Betlista, 4 years ago, ,

In SRM there were 849 registered participants

•
• +15
•

By Betlista, 4 years ago, ,

I strongly believe, that editorial delivery for SRM is (should be) part of the contest.

The fact, that TopCoder editorials are delayed (currently unavailable ) is really bad I think. So there are two possibilities — to do not care or do something with that. I selected the later.

•
• +31
•

By Betlista, 4 years ago, ,

I did the same mistake in a second contest (at least), so I have to write this down...

When I have sorted array, I'm using binary search to find number of elements lower than some boundary value d. Problem is, that in Java, call Arrays.binarySearch(array, d) returns so called insertion point and it is valid to return for array let say 10, 20, 20, 20, 30 value 2 (0-based index, tried with Java 7) as the insertion point for searched value 20, but it doesn't mean that there are 2 elements lower than 20 in array...

•
• +3
•

By Betlista, 4 years ago, ,

I failed in contest #280 because of int overflow.

I knew I have to handle that, but I missed it :-( So I was looking for some automatic check.

•
• +15
•

By Betlista, 4 years ago, ,

This is just a note for me, to not "invent" it in next contests, maybe too easy for others.

I have two intervals [f1, t1] and [f2, t2] and I want to find intersection.

private static int[] intersect(int f1, int t1, int f2, int t2) {
if ( isBetween(f1, f2, t2) ) {
return new int[] { f1, Math.min(t1, t2) };
} else if ( isBetween(f2, f1, t1) ) {
return new int[] { f2, Math.min(t1, t2) };
} else {
return null;
}
}

private static boolean isBetween(int n, int f, int t) {
return f <= n && n <= t;
}


•
• +8
•

By Betlista, 6 years ago, ,

Hello coders,

probably some of you know CodeChef (another programming contest page).

Why am I writing about another page? Because I believe, that when you want to make your rating higher, you have to compete in contests. Some coders think, that practice and contest are the same (just solving the problems), but definitely they are not for me. In contest I'm under the pressure (time pressure, fear, that if I do not solve the problem my rating will be lower, ...) and so I'm doing a lot of mistakes in real contest (like not reading statement carefully, missing some conditions, trying to submit quickly without precise testing and so on).

•
• +51
•

By Betlista, 6 years ago, ,

Hi coders,

I was looking for code highlighting functionality on CodeChef forum. Now when new editorials will be moved from wiki to forum, this request is more important as I am convinced that code highlighting improves readability of the code (it's also one thing that's missing on CodeForces when you want to hack someones solution in contest — code is not highlithed), I wrote new extension to enable such functionality.

First version just lets you choose the language (I want to improve this in next version).

### What you get?

#### Java highlighted

To install the extension you have to:

2.) unzip somewhere

3.) go to the Tools > Extensions in chrome settings

4.) than you need to enable developer mode and upload unpacked extension (from the location where you unpacked it)

By Betlista, 7 years ago, ,

Coders always argue which programming language is better. Each one of you have some preference. I like Java the most. But there is at least one thing missing in Java for sure — permutations.

•
• +20
•

By Betlista, 7 years ago, ,

Counting map is special map used for counting things — values in map are integers.

•
• +20
•

By Betlista, 7 years ago, ,

Hello coders,

next TC SRM 533 is scheduled on 02.18.2012 12:00 PM EST.

Registration starts 3 hours before start and ends 5 minutes before start (be aware that even if coding phase starts at 12:05, registration ends at 11:55).

Also there is limit for number of participants (something like 2300 or so), but typically there is not so many coders (just in time of TCO, number of participants in SRMs increases over the limit).

•
• +29
•

By Betlista, 7 years ago, ,

This is first blog in my new series "How I spoiled the contest".

By Betlista, 7 years ago, ,

Hello coders,

I misundestood something in problem 69B and I do not know what. Some advice would be great.

•
• +1
•

By Betlista, 7 years ago, ,

Probably almost everyone here knows the contest, but I didn't find post about it here (except this one)...

Currently there is qualification round for GCJ 2012 running just now, enjoy ;-)