JOIN
 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 | Watch Thread  |  My Post History  |  My Watches  |  User Settings View: Flat (newest first)  | Threaded  | Tree Previous Thread  |  Next Thread Forums TopCoder Cookbook Algorithm Competitions - Rewriting Phase 1.3. Testing Using Alternative Brute-Force Solution
 1.3. Testing Using Alternative Brute-Force Solution | Reply
 Re: 1.3. Testing Using Alternative Brute-Force Solution (response to post by Nickolas) | Reply Writing a brute force solution is not the only applicable method to automatically test your solution. For example, consider the ProductsOfDigits problem. If your solution involves lots of special cases (like mine did), submitting it without automated testing is looking for trouble. The problem has the form of "given x and k, find the smallest i such that F(k,i) = x", where the function F can be easily calculated. Thus, the method of automated testing is the following: ```for each k for each i from 0 to a big number x = F(k,i) j = answer of our program on x if j>i then ERROR if j
 Re: 1.3. Testing Using Alternative Brute-Force Solution (response to post by Eryx) | Reply That's a nice testing method. It could even make into a separate recipe (since it doesn't really fit the topic of this one), if we could think of other examples (preferably easier ones). Any ideas?
 Re: 1.3. Testing Using Alternative Brute-Force Solution (response to post by Eryx) | Reply As a second thought, we'll make it a sidebar - it's a perfect fit, since it's something rare (no other such problem example) but interesting.
 Forums TopCoder Cookbook Algorithm Competitions - Rewriting Phase 1.3. Testing Using Alternative Brute-Force Solution Previous Thread  |  Next Thread