Binary Search in Array - IP database problem

Back to Problem Solutions forum

Moff     2014-11-04 09:32:00
User avatar

There are a lot of rows in db-ip.txt where country code is empty, for example:

1ljj0tc 3
1ljj11c 73

If i found address from such range i represent it as empty string, but checker don't accept this.

I have refreshed page until it generated test case without empty countries and at least i have solved it.

Oh, my ugly English!

Rodion (admin)     2014-11-04 09:34:30
User avatar

Wow, it is really bad - I should try to take care of this right now, since it is also used in the site's new functionality :-o

Thanks a lot for reporting this!

UPD: I've uploaded the filtered version of the file - there should be no empty countries. Really it is quite curious - original file contained about 100 such entries... I'm quite lucky you've found some of them :)

GlideThestral     2015-12-22 15:03:56

Looks like checker for this problem doesn't accept line with extra space in the end: it says "#### country codes expected". Number of codes in the line was correct but there was a space after the last one.

Please login and solve 5 problems to be able to post at forum