Algorithm competitions on Topcoder take the form of SRMs, or Single Round Matches. The matches last for around one and a half hours, with a 75 minute coding phase. There are usually three SRMs within a month.
Each SRM will have a number associated with it, such as SRM 730. Topcoder SRMs are a lot of fun and quite exciting. This guide will walk you through the things you need to know to compete in an SRM and is a great reference for any other time you need it. Feel free to follow the written instructions below.
You can find the dates for the next SRMs from the Event Calendar, and practice on past problems in the Arena.
OVERVIEW
An SRM competition consists of three different problems of increasing difficulty. After the coding phase, there is a chance to “challenge” the code of other competitors for extra points by finding a test case where their solution fails.
Specifically, the phases associated with each competition are:
-
Registration Phase
This is when the competitors are able to register for the competition. Open until five minutes before the competition. -
Coding Phase
The phase when the competitors are given the problems and write their solutions. The duration is 75 minutes. -
Intermission Phase
A short break - have a breather, get yourself a drink, prepare for the next phase. Duration: 5 minutes. -
Challenge Phase
Competitors are given access to the solutions by other competitors within their room and can challenge each others’ solutions. This phase lasts for 15 minutes. -
System Test Phase
The final phase when extensive test sets are run against the solutions to fully determine which solutions pass for the problems.
CHOOSE YOUR ARENA
Currently, there are two types of arenas that you can use to compete in Topcoder SRMs: the web arena and the applet arena. The applet arena has been around for 15+ years, has a richer functionality, and provides a better overall experience but it requires some extra setup.
The web arena requires no special setup since it is just a regular web page. Its functionality is limited however as it doesn’t support any editor plugins and it is still in beta mode at the time of writing. When successfully logged into the web arena, you should see something like this:
Most experienced competitors use the applet arena and it is also used at the Topcoder Open onsite finals.
THE APPLET ARENA
To launch the applet arena, you need to make sure you have a Java runtime environment installed. You can get that here.
Once you have completed that, you may click here to download the Applet Arena.
When the arena has finished downloading, you will get a security warning dialog and you will have to check the checkbox below before you can run the arena. Once it’s checked, click the run button. You may also follow the instructions on the arena info page to include an exception for Topcoder in your Java configuration.
Finally, you’ll get the arena login screen. Type in your Topcoder handle for the username and then type in your password to login. If you run into any problems, be sure to send an email to support@topcoder.com.
Note: If you are behind a firewall or corporate proxy and cannot login using the “Direct” option, you can try changing the connection settings to HTTP Tunnel A, HTTP Tunnel B, etc. These don’t always work, and in some cases it may be impossible to login to the arena when certain network restrictions are present.
Please view “Local Firewall and Network Connections” in “Extras” below for more information.
If you are logged in successfully you will see the Arena home screen as seen below:
REGISTERING FOR AN SRM
In order to compete in an SRM, the first thing you must do is register for it. Registration will typically begin 4 hours prior to the SRM start time and it will end 5 minutes before the SRM start time. If you are just one minute late you will not be able to register, so it is important to register on time.
To register for an SRM in the applet arena, go to the Active Contests dropdown, choose the SRM, and then select the Register button. If you do not see any active contests listed then make sure you have the correct date.
Note: The register option is disabled in this screenshot since the match is over, but in a real match it would be enabled
The web arena is similar, and should have a register button after you login.
You may get some additional dialogs asking you to agree to terms, etc., and you’ll need to accept those in order to register for the match.
THINGS TO KNOW BEFORE COMPETING
How many are registered?
If you want to view how many people are registered, you can go to Active Contents -> Registrants (if using the applet arena).
What do I need to know about divisions and ratings?
Each SRM has two divisions, and the 1st division is composed of competitors with a rating of 1200 or above. New competitors or those with ratings of 1199 and below compete in division 2. The divisions are designed to ensure that competitors get a proper problem set based on their current skill level. Each time you compete, your rating will usually go up or down depending on how you performed in the match. It can also stay the same.
Note that even if you register for a match but don’t open any problems or issue any challenges, your rating will not change and it will calculate as if you hadn’t competed in the match.
I’m assigned to a room, what does that mean?
Once registration closes, each competitor will be assigned to a “room”. It’s not really important to know your room number, as this is just a grouping that Topcoder uses to assign competitors. There will typically be 20 competitors assigned to a room. You can use the Active Contents->Enter menu (applet arena) to enter your room.
Note that the “Enter” option will be disabled until the room assignment algorithm completes, which usually takes about 1-2 minutes after registration closes.
For the web arena, you will see an Enter button, and you can click that button to enter your room.
While you’re waiting for the match to begin, it’s a good idea to see what the point values are for the problems. An SRM will typically have 3 problems with varying degrees of difficulty. The point spread for the 3 problems is typically 250 points for the first problem, 500 points for the second problem, and 1000 points for the third problem. This point spread can be different however (depending on whether a problem is easier or harder) and often is. You can see the points for the three problems in the applet arena by clicking the dropdown shown below.
Once the coding phase starts, you can use this same dropdown to open a problem. In the web arena, you won’t have a dropdown, but will see the problems listed with their point values as shown below.
COMPETING IN THE MATCH
Once you’ve entered your room, you can just wait for the contest to begin. There will be a competition status window that will show you how much time is left until the contest begins (applet arena). Once the coding phase starts, it will show how much time is left for coding, etc. You can use this window to know how much time is left in any phase.
In this screenshot, the contest is complete but in a live match it would show you how much time there is before the coding phase begins.
The Web Arena will have a countdown as well:
Once the coding phase begins, you’ll get a popup saying the coding phase is beginning in the applet arena. In the web arena, you’ll see links beside the problem that say “Unopened”. You can click the Unopened link to open a problem.
Note that Topcoder is all about speed and accuracy. It is important to be fast, but it is more important to be right. If your problem fails any of the test cases the problem writer has created or fails a challenge case from another competitor (more on this later), you get 0 points for that problem.
Once you open a problem, you will see the problem statement. At this time, the problem timer starts and the point value for the problem begins to decrease. So the longer it takes you to solve the problem, the less points you will receive.
Pay close attention to the definition section of the problem statement, as this section will tell you how the class needs to be declared and the method name.
So in this example, if we were coding in C++ we would declare something like what you see below.
1
2
3
4
5
6
7
class RingLex {
public: string getmin(string s) {
string ret = "";
// code your solution for the problem here
return ret;
}
}
Note that our class name and method name match the definition values shown above, and case matters. It’s very important to get this exactly right, otherwise, your solution will fail!
You will also need to look at the constraints for the problem, which will tell you important information about the inputs, outputs, time limit for the problem, etc. For example, if N has a max value of 5,000,000,000, then you may have to code a very different solution than if N has a max value of 50.
If you want to change the coding language, you can use the options at the top right of the coding window (applet arena). In the web arena, you can use the gear icon which will bring up a dropdown where you can choose the language.
Once you have coded your solution, you can use the compile button to make sure it compiles successfully. After you’ve compiled your solution successfully, you can test it against the example cases or you can also create your own test cases (highly recommended). Use the Test button (applet arena) or Test Panel (web arena) to test your solution. To test with one of the example cases, you can choose the test case in the drop down you want to test with. Below is a screenshot from the applet arena where we are testing example 0.
If you want to use your own custom test case, then you can change the values in the test dialog. In the above example, we could enter in different values for variables n and k. Once you are satisfied with your solution, then you need to submit it, which you can do by clicking the submit button. Don’t forget this step! If you fail to submit your problem, then you will receive 0 points for it.
Tip: Be sure to test your solution and make sure you are satisfied with it before you submit. You can submit again if you find a bug after your submit, but there is a 10% penalty in your points if you do this.
COMPETING IN THE MATCH - THE CHALLENGE PHASE
Once the coding phase is complete, there is usually a 5 minute intermission. Use this time to catch your breath, get something to drink, or even better - prepare challenge cases for the challenge phase.
If you found a particularly tricky corner case to a problem, this is a great time to put that test case to use as there is a chance that other competitors didn’t think of it.
In the challenge phase, you can view other competitors’ code. In the applet arena, click the Summary button to view a list of all the problems submitted in your room.
After you click Summary, you’ll see a list of the problems and their point values for each competitor’s submission.
The web arena is slightly different, but the same concept. In both the web arena and applet arena, you can click on the point value for a competitor’s problem to open that problem
If you find what you think to be a bug with their code, then you can press the challenge button and try to challenge it. You enter the challenge case in the challenge window before pressing the challenge button.
Once you submit your challenge, the system will tell you if your challenge was successful or unsuccessful.
Here are some important points to remember about the challenge phase:
-
You cannot challenge a solution that has already been successfully challenged.
-
A successful challenge increases your score by 50 points.
-
An unsuccessful challenge decreases your score by 25 points.
-
As long as your score is non-negative, you can challenge (this means you can challenge even if you didn’t submit a problems).
-
Once your score becomes negative, you can no longer challenge. So if you challenge with a 0 score and fail, your score will become -25 and you will no longer be able to challenge.
COMPETING IN THE MATCH - SYSTEM TESTING PHASE
Once the challenge phase ends, then the system test begins. All solutions that have not been challenged successfully will be run against the system tests. If a given problem fails any of the system tests, then that competitor will receive 0 points for that problem. If all the system tests for a problem pass, then the competitor will receive the points for that problem and they will be added to their match total. You can view the results for the match by going to Active Contests->Division Summary.
As shown below, you can see which problems passed or failed system tests, and also which problems were challenged.
AFTER THE MATCH
Once the match is over (system testing phase is completed), your rating will be updated. This usually takes anywhere from 5-15 minutes after the system tests finish. To see your new rating, you need to log off and log back into the arena. The statistics in your profile on the Topcoder web site will also show the new rating, but this can take up to several hours.
To get to your rating graph, you can click My Profile on the web site. Click your handle in the upper right to get this list of buttons to display.
You can view your rating graph to see how you are doing over time, how many matches you’ve competed in, your percentile, and other statistics.
Comments
0 comments
Article is closed for comments.