Our first official ACM TopCoder competition was a relative success. Today’s competition drew two ACM members: myself and Tony Wesley. Unfortunately, Tony wasn’t able to register for the competition in time and didn’t officially compete but still worked the problems. We’ll continue to meet for future Single Round Matches and hope to grow the group. We’re looking to create an informal environment for members to compete, show-off, hone, refine, or even discover their programming skills. If that sounds like something you’re interested in email Luke at ljduncan@umd.umich.edu. The next competition will be on Saturday, February 7th, at noon. A full schedule of competitions can be found here.
Tony worked and compiled the 250 point problem. Since he didn’t officially compete he wasn’t ranked.
Luke submitted the 250 point problem, compiled the second problem, and successfully challenged 1 problem. Unfortunately Luke’s first problem didn’t pass the system testing. Luke finished 15th out of 20 in his division 1 competition room.
The big lesson learned today was to read the problem statement carefully. The 250-point problem was easy, if you read it correctly. The problem is as follows:
Once upon a time, there was a kingdom where math was always a big problem. When the post of the royal treasurer needed to be filled, applicants were presented with the following problem: “We have two arrays of integers, A and B. A and B each contain exactly N elements. Let’s define a function S over A and B:
S = A0*B0 + … + AN-1*BN-1
Rearrange the numbers in A in such a way that the value of S is as small as possible. You are not allowed to rearrange the numbers in B.” The problem writers need a program to check the correctness of the applicants’ answers. Given vector <int>s A and B, return the smallest possible value for S.
Note the statement: “You are not allowed to rearrange the numbers in B.” This DOES NOT mean that the algorithm cannot rearrange the numbers in B. It simply means that the citizens whom the law applies to cannot. Understanding that is the difference between spending 20 minutes and spending 2 minutes on the problem.
Once the official Problem Set & Analysis is uploaded to TopCoder a link will be added to the post.
January 21st, 2009 at 8:40 pm
Was a lot of fun!
Posting this from the ACM room on our newly set up Windows machine!