JOIN
 Revision History
 Select a Forum     Round Tables New Member Discussions News Discussions Algorithm Matches Marathon Matches NASA Tournament Lab TopCoder Cookbook High School Matches Sponsor Discussions Development Forums Design Forums Search My Post History  |  My Watches  |  User Settings Forums TopCoder Cookbook Marathon Competitions - New Recipes 3.2 Setting Up Your Environment/Keeping Track of Your Progress Revision History (2 edits)
 3.2 Setting Up Your Environment/Keeping Track of Your Progress ProblemMarathon Matches, as the name suggests, require a lot of time and effort, it is not enough to just submit a solution, you need to constantly make changes to the solution during the contest in order to improve it. After you spend a good amount of time improving your solution you will realize that a lot of that time and effort is spent on organizing the versions of code, deciding which solution performs better, recalling the changes done between two submissions and reverting them. All this can be avoided by organizing your solving environment properly.SolutionSetting Up your Test Environment.Choose Your Preferred Integrated Development Environment (IDE): Be sure to choose a good IDE because Marathon Matches usually requires writing a lot of code and a good IDE with a good debugger will save you a lot of time. I would recommend Eclipse for C++, Java and Python and Visual Studio Express for C++, C# and VB. Both are free and great IDEs but this is just a recommendation, you should choose the one you feel comfortable with.Write a Naïve Solution: Once you have understood the problem statement the first thing you need to do is to write a naïve solution. By naïve solution I mean the simplest solution you can write, it doesn’t matter if the score of this solution is low, it is only important that it is a valid solution (gives a score greater than zero) and that it has as few lines of code as possible. An example will be just to return zero or an empty string, it will depends on the problem. For a concrete example take a look at the problem PolimerPaking, here the most simple solution will be to return an array of integers with length zero (return new int[0];), this is not a great solution but it is a valid solution that gives you a score greater than zero and will allow you to set up the environment.Test Your Solution: After you wrote your naïve solution you will need to set up your test environment and test that solution. There are two ways to test your solution against TopCoder specifications, you can submit your solution to the TopCoder server or you can Download the Visualizer Tool and test it locally, this is much faster and flexible because you can run the visualizer in your computer as many times as you want.Implement Your Own Tester: When you have your naïve solution and you tested that it gets a score greater than zero in the visualizer or in the TopCoder server then it will be a very smart move to implement the visualizer code directly in your solution, this will allow you to run more tests faster without using standard input and output to exchange information with the visualizer, it will also allow you to calculate the mean and variance of your scores and do other statistical analysis. It is very important when you rewrite the code of the visualizer to be sure that it returns the same score as the visualizer and the TopCoder server.
 3.2 Setting Up Your Environment/Keeping Track of Your Progress I'm back with more time now so let me know if I can improve it. I have rewritten some parts and added others, I have removed the images a table and the style because it is a real pain to put them here in the forum.ProblemMarathon Matches, as the name suggests, require a lot of time and effort, it is not enough to just submit a solution, you need to constantly make changes to the solution during the contest in order to improve it. After you spend a good amount of time improving your solution you will realize that a lot of that time and effort is spent on organizing the versions of code, deciding which solution performs better, recalling the changes done between two submissions and reverting them. All this can be avoided by organizing your solving environment properly.SolutionSetting Up your Test Environment.Choose Your Preferred Integrated Development Environment (IDE): Be sure to choose a good IDE because Marathon Matches usually requires to write a lot of code and a good IDE with a good debugger will save you a lot of time. I would recommend Eclipse for C++, Java and Python and Visual Studio Express for C++, C# and VB. Both are free and excellent IDEs but this is just a recommendation, you should choose the one you feel comfortable with.Write a Naïve Solution: Once you have understood the problem statement the first thing you need to do is to write a naïve solution. By naïve solution I mean the simplest solution you can write, it doesn’t matter if the score of this solution is low, it is only important that it is a valid solution (gives a score greater than zero) and that it has as few lines of code as possible. An example will be just to return zero or an empty string, it will depends on the problem. For a concrete example take a look at the problem PolimerPaking, here the most simple solution will be to return an array of integers with length zero (return new int[0];), this is not a great solution but it is a valid solution that gives you a score greater than zero and will allow you to set up the environment.Test Your Solution: After you wrote your naïve solution you will need to set up your test environment and test it. There are two ways to test your solution against TopCoder specifications, you can submit your solution to the TopCoder server or you can Download the Visualizer Tool and test it locally, this is much faster and flexible because you can run the visualizer in your computer as many times as you want.Implement Your Own Tester: When you have your naïve solution and you tested that it gets a score greater than zero in the visualizer or in the TopCoder server then it will be a very smart move to implement the visualizer code directly in your solution, this will allow you to run more tests faster without using standard input and output to exchange information with the visualizer, it will also allow you to calculate the mean and variance of your scores and do other statistical analysis. It is very important when you rewrite the code of the visualizer to be sure that it returns the same score as the visualizer and the TopCoder server.
 3.2 Setting Up Your Environment/Keeping Track of Your Progress I'm back with more time now so let me know if I can improve it. I have rewrote some parts and added others, I have removed the images a table and the style because it is a real pain to put them here in the forum.ProblemMarathon Matches, as the name suggests, require a lot of time and effort, it is not enough to just submit a solution, you need to constantly make changes to the solution during the contest in order to improve it. After you spend a good amount of time improving your solution you will realize that a lot of that time and effort is spent on organizing the versions of code, deciding which solution performs better, recalling the changes done between two submissions and reverting them. All this can be avoided by organizing your solving environment properly.SolutionSetting Up your Test Environment.Choose Your Preferred Integrated Development Environment (IDE): Be sure to choose a good IDE because Marathon Matches usually requires to write a lot of code and a good IDE with a good debugger will save you a lot of time. I would recommend Eclipse for C++, Java and Python and Visual Studio Express for C++, C# and VB. Both are free and excellent IDEs but this is just a recommendation, you should choose the one you feel comfortable with.Write a Naïve Solution: Once you have understood the problem statement the first thing you need to do is to write a naïve solution. By naïve solution I mean the simplest solution you can write, it doesn’t matter if the score of this solution is low, it is only important that it is a valid solution (gives a score greater than zero) and that it has as few lines of code as possible. An example will be just to return zero or an empty string, it will depends on the problem. For a concrete example take a look at the problem PolimerPaking, here the most simple solution will be to return an array of integers with length zero (return new int[0];), this is not a great solution but it is a valid solution that gives you a score greater than zero and will allow you to set up the environment.Test Your Solution: After you wrote your naïve solution you will need to set up your test environment and test it. There are two ways to test your solution against TopCoder specifications, you can submit your solution to the TopCoder server or you can Download the Visualizer Tool and test it locally, this is much faster and flexible because you can run the visualizer in your computer as many times as you want.Implement Your Own Tester: When you have your naïve solution and you tested that it gets a score greater than zero in the visualizer or in the TopCoder server then it will be a very smart move to implement the visualizer code directly in your solution, this will allow you to run more tests faster without using standard input and output to exchange information with the visualizer, it will also allow you to calculate the mean and variance of your scores and do other statistical analysis. It is very important when you rewrite the code of the visualizer to be sure that it returns the same score as the visualizer and the TopCoder server.