List on interesting problems on spoj
DP:
- Advanced edit distance ADVEDIST
- Distinct Subsequences DSUBSEQ
- Juice Extractor JUICE (very cool problem)
- Coins Game MCOINS ( easy dp to practice )
- Bob and magical scale MGCSCLS
- Boy scouts BOYSCOUT (n^4 passes)
- Palindrome 2000 IOIPALIN ( calculate LCS of string and it’s reversed form )
- Counting binary strings STRCOUNT (dp /recurse + memo)
- Another tree problem MTREE ( cool problem, dp + dfs )
Max flow – min cut and similiar
- Fast Maximum Flow FASTFLOW
- Gas Wars GASWARS
- Fast Maximum Matchig MATCHING
- MobiZone vs VinaGone MOBIVINA
- Group partition MPART
- Potholers POTHOLE
- Disjoint Paths DISJPATH
- Oil Company OILCOMP (most efficient algorithm here is dinic( but simple dfs passes too), also this task can be done with bit masks. Tricky task. )
Math problems, combinatorics and similiar
- Win gold medal WINGOLD
- OAE OAE
- Non-decreasing digits NY10E
- Special Numbers NOVICE63
- N-factorful NFACTOR
- N DIV PHI_N NDIVPHI
- Legrende Symbol LEGRENDS
- LCM Sum LCMSUM
- IOI camp sequence ICAMPSEQ
- Suffix of cube CUBEND ( had a lot of fun while solving this )
- A HUGE TOWER CTOI10D3
- Skyline SKYLINE
- Flibonakki FLIB ( matrix expo, try to get 2×2 matrix or try to speed up 3×3 matrix calculation )
Graph problems
- Arbitrage ARBITRAG (floyd-warshall)
- Code CODE ( very cool problem, find euler tour with DFS and print it reversed )
- Frogger FROGGER ( i call it 3d bfs, funny problem )
- Indiana Jones and the lost Soccer Cup GCPC11C ( find if there’s only one way to topological sort )
- Time to live GCPC11J ( longest path in tree )
- Ghosts having fun GHOSTS ( on-line algorithm for checking if DAG stays acyclic after adding edge to it )
- Hierarchy MAKETREE (topological sort)
- Paradox PARADOX ( dfs )
- Query on a tree QTREE ( LCA )
- Query on a tree 2 QTREE2 ( LCA again )
- Wandering Queen QUEEN ( BFS + bit mask )
- Robots on grid ROBOTGRI ( bfs/dfs + dp )
- Elevator trouble ELEVTRBL ( simple BFS )
- Mega inversions TRIPINV ( find amount of triplets which satisfy : i<j<k Ai>Aj>Ak. Hint : 2 Binary indexed trees )
- Capital City CAPCITY ( find nodes from which we can achieve other nodes )
- Cost KOICOST ( reverse the problem )
Computional geometry:
- A Chase in wonderland CHASE ( find maximum size of collinear points)
- Closest pair of points CLOPPAIR
- Bob and his new kite factory KITEPRBL ( three things to practice )
- Closest Triplet CLOSEST
- Cocircular Points MCOCIR (hardest part is to get working well equations )
- The Ant ANTTT ( simple line intersection exercise + find and union 😉 )
- Doors and penguins DOORSPEN ( similiar to separate points, but now we must deal with rectangles, not points )
- Maximum triangle area MTRIAREA ( given points on a plane find 3, which form biggest triangle area )
- Separate Points SPOINTS ( given n+m points on plane, find straight line which separates n points from m points )
- Military Story VMILI ( convex hull and other stuff )
List will be successively updated.