Saturday, March 14, 2009

[Inert Your Title Here]

Well it is almost the end of another Spring Break. I had originally planned to copy the Measure Theory portion of my Analysis notes into my new notebook, study look over some Differential Equations, and get in some SPOJ time. Needless to say things didn't go as planned. Pretty much all my free time was spent working on SPOJ.

Most of the problems were ones that I had previously started but for some reason was unable to generate an acceptable solution. The only totally "new" problems were JAVAC, SUMITR, and TRICENTR. None of these were all that difficult, but the source limit on SUMITR did cause some issues. I ended up writing the solution for that in C rather than C++.

Here are the other solved problems and my remarks.

ADOMINO: Exactly the same as AGGRCOW but there are some cases that AGGRCOW didn't have so some modifications needed to be added in order to work around these. Not sure if this should even count as a "new" problem really, but why not, it did take me more than 1 submission.

SBANK: I just needed to use a faster way to read the input. To think that I had this problem unsolved for about half a year only because of this.

SHPATH: I had to implement Dijkstra's with a priority queue (a heap like data structure) rather than a set. Personally I prefer to use the set solution but I can see why the priority queue method is faster.

STABLEMP: My idea of using a greedy algorithm was correct. The problem was in the way I was storing the necessary information. Just imagine my embarrassment when I discovered this small but important mistake.

No comments: