The Online Judge Page

"The mediocre teacher tells, the good teacher explains,
the superior teacher demonstrates, and the great teacher inspires."
- William Arthur Ward.

Here are some of my solutions to the problem set at Valladolid, which features a collection of problems taken from the ACM ICPC (International Collegiate Programming Contest) over the years.

This page is specially dedicated to Dr Ang Chuan Heng, whose professionalism really inspired me to learn more about algorithms, on my own.

Total number of solved problems (Accepted and Accepted with Presentation Error) : 95

The online judge have since moved to a new location and system, the latest stats can be found here. Additionally, Felix Halim also provides a script that mines author statistics given an author id. You can find my stats on his site here. Note that there is a slight discrepancy in the problem solved count between the old and new system, which is due to the new system not counting those solutions with "Presentation Error" as "Accepted" (the old one counts them).

Latest Problems Solved : 


Problem No. Name Description Rating Source
P100 The 3N+1 Problem NIL NIL P100
P102 Ecological Bin Packing Exhaustive Enumeration with Running Min NIL P102
P103 Stacking Boxes Transitive Closure using Warshall's Algorithm NIL P103
P105 The Skyline Problem Ad Hoc Problem NIL P105
P107 The Cat in the Hat Exponentiation NIL P107
P108 Maximum Sum Dynamic Programming NIL P108
P110 Meta-Loopless Sorts Permutation Generation with Ad Hoc Output Logic NIL P110
P111 History Grading Longest Common Subsequence using Dynamic Programming NIL P111
P112 Tree Summing Iterative Tree Parsing(Input Parsing Related) NIL P112
P113 Power of Cryptography Exponents NIL P113
P116 Unidirectional TSP Dynamic Programming with Lexicographical Min Output NIL P116
P119 Greedy Gift Givers Ad Hoc Problem NIL P119
P126 The Errant Physicist Ad Hoc Problem NIL P126
P136 Ugly Numbers Enumerate Powers of Prime Factors NIL P136
P138 Street Numbers Pell's Equation NIL P138
P147 Dollars Classic DP solution to Coin Changing Problem NIL P147
P155 All Squares Recursion NIL P155
P160 Factors and Factorials Prime Factorization and DP NIL P160
P164 String Computer Classic DP solution to the Edit Distance Problem NIL P164
P166 Making Change Classic DP solution to Coin Changing Problem NIL P166
P167 The Sultan's Successors Backtracking:Classic N-queen Problem NIL P167
P190 Circle Through Three Points Simple Geometry NIL P190
P191 Intersection Computational Geometry NIL P191
P202 Repeating Decimals(not done!) NIL NIL P202
P227 Puzzle(not done!) Simulation NIL P227
P231 Testing the Catcher Dynamic Programming NIL P231
P253 Cube Painting Ad Hoc Problem NIL P253
P264 Count on Cantor Math NIL P264
P272 Tex Quotes Ad Hoc Problem NIL P272
P297 Quadtrees Recursive Quadtree Traversal NIL P297
P299 Train Swapping Counting Swaps in Bubble Sort NIL P299
P315 Network
Counting Articulation Points in a graph
NIL
P299
P318 Domino Effect(not done!) Shortest Path NIL P318
P326 Extrapolation Using Table Dynamic Programming NIL p326
P332 Rational Numbers Modulus and GCD NIL P332
P336 A Node Too Far Graphs NIL P336
P357 Let Me Count The Ways Classic DP solution to Coin Changing Problem NIL P357
P369 Combinations Computating combinations while handling overflow NIL P369
P371 Ackermann Functions Dynamic Programming NIL P371
P374 Big Mod Recursion with overflow handling NIL P374
P406 Prime Cuts Sieve of Erastothenes NIL P406
P424 Integer Inquiry "Manual" Addition NIL P424
P438 Circumference of Circle Circle through 3 points problem NIL P438
P439 Knight Moves Breadth First Search NIL P439
P443 Humble Numbers Enumerate using Fundamental Theorem of Arithmetic NIL P443
P495 Fibonacci Freeze Simulate addition of BIG numbers NIL P495
P501 Black Box Priority Queue NIL P501
P514 Rails Stack Manipulation NIL P514
P516 Prime Land Prime Factorization NIL P516
P530 Binomial Showdown Big Modulus NIL P530
P531 Compromise Longest Common Subsequence using Dynamic Programming NIL P531
P536 Tree Recovery Recursion NIL P536
P541 Error Correction Ad Hoc Problem NIL P541
P543 Golbach's Conjecture Sieve of Erastothenes NIL P543
P545 Heads Math NIL P543
P562 Dividing Coins Number Partitioning Problem(NP-Complete). Memoization Solution NIL P562
P579 Clock Hands Simple Math NIL P579
P583 Prime Factors Prime Factorization NIL p583
P591 Box of Bricks Ad Hoc Problem NIL P591
P594 Endian Bit Twiddling NIL P594
P615 Is It a Tree Check for Connected-ness of Graph and
Edge = Vertices - 1
NIL P615
P623 500! Handling Large Numbers NIL P623
P640 Self Numbers Dynamic Programming NIL P640
P661 Blowing Fuses Dynamic Programming NIL P661
P674 Coin Change Classic DP solution to Coin Changing Problem NIL P674
P686 Goldbach's Conjecture (II) Seive of Erastothenes & Pre-calculation NIL P686
P704 Color Hash Iterative Deepening A* Search NIL P704
P708
Dreisam Equations Parse expression into Infix tree and perform bottom up memoized "reduction" over operators +-*.
Top down solution printing using memoized partial solutions at every internal node.
NIL
P708
P709 Formatting Text Dynamic Programming NIL P709
P711
Dividing Up
Dynamic Programming with optimizations for avoiding Time Limit Exceeded.
Usage of lookup tables for multiplication.
NIL
P711
P712
S-Trees Linear binary tree representation and traversal.
NIL
P712
P713 Adding Reverse Numbers Large Numbers NIL P713
P750 8 Queens Chess Problem Backtracking : N-queen Problem NIL P750
P796
Critical Links Modifed DFS with backtrace on encountering a cycle. Backtrace will strike out all edges that are
part of a cycle, leaving non-cycle edges. All non-cycle edges are the critical links
NIL
P796
P806 Spatial Structures Recursive Quadtree Traversal NIL P806
P808 Bee Breeding Ad Hoc Simulation and Grid Structure NIL P808
P812 Trade on Verweggistan Greedy algorithm + Cartesian Product NIL P812
P833 Water Falls Computational Geometry NIL P833
P836 Largest Submatrix Dynamic Programming NIL P836
P880 Cantor Fractions Ad Hoc Mathematical Analysis NIL P880
P903 Spiral of Numbers Ad Hoc Mathematical Analysis NIL P903
P10004 Bicoloring BFS with constraint checking NIL P10004
P10013 Super Long Sums "Manual" Addition NIL P10013
P10018 Reverse and Add Ad Hoc NIL P10018
P10035 Primary Arithmetic Large Numbers NIL p10035
P10038 Jolly Jumpers Ad Hoc NIL p10038
P10055 Hashmat Ad Hoc Problem NIL P10055
P10071 Back to High School Physics Ad Hoc Problem NIL P10071
P10074 Take the Land Dynamic Programming NIL P10074
P10082 WERTYU Ad Hoc NIL P10082
P10110 Light, More Light Ad Hoc Problem NIL P10110
P10131 Is Bigger Smarter? Longest Increasing Subsequence NIL P10131
P10132 File Fragmentation Ad Hoc Problem NIL P10132
P10134 Autofish Simulation NIL P10134
P10181 15-Puzzle Problem Iterative Deepening A* Search NIL P10181
P10182 Bee Maja Hexagonal Grid Traversal NIL P10182
P10199
Tourist Guide Find Articulation Points in a graph. DFS with augmented data.  NIL
P10182
P10207 Unreal Tournament(not done) NIL NIL P10207
P10340 All in All Ad Hoc NIL P10340