Skip to main content Link Search Menu Expand Document (external link)

We selected a few problems, which we think are good training material for programming contests.

Hide chapter hint.

chapterproblemjudge
anagramsAnagram verifier[spoj:ANGRAM]
arithm expr evalBoolean Logic[spoj:BOOLE]
arithm expr evalArithmetic Expressions[spoj:AREX]
arithm expr evalCells[spoj:IPCELLS]
bellman fordNegative Cycles[spoj:NEGCYC]
bfsHike on a Graph[spoj:HIKE]
bfsPrime Path[spoj:PPATH]
biconnected componentsPolice Query[spoj:POLQUERY]
binary searchFill the cisterns[spoj:CISTFILL]
binary searchEgg Drop[gcj:eggdrop]
bipartite matchingCrime Wave[icpcarchive:5584]
bipartite matchingDungeon of Death[spoj:QUEST4]
bipartite matchingMuddy Fields[spoj:MUDDY]
bipartite matchingMission Improbable[kattis:improbable]
closest pointsClosest Point Pair[spoj:CLOPPAIR]
closest pointsClosest Triplet[spoj:CLOSEST]
connected componentsThe Ant[spoj:ANTTT]
connected componentsLego[spoj:LEGO]
conseilsFrosting on the Cake[icpcarchive:8154]
convex hullDoors and Penguins[spoj:DOORSPEN]
convex hullBuild the Fence[spoj:BSHEEP]
convex hullBlowing Candles[icpcarchive:8155]
dancing linksSudoku[spoj:SUDOKU]
dancing linksMaking Jumps[spoj:MKJUMPS]
data 1dUnique Encryption Keys[icpcarchive:5881]
dfsABC Path[spoj:ABCPATH]
dfsA Bug’s Life[spoj:BUGLIFE]
dijkstraMice and Maze[spoj:MICEMAZE]
dijkstraDragon Maze[gcj:China2014roundB]
dilworthReservations of taxis[kattis:taxicab]
dilworthStock Charts[gcj:2009round2C]
dilworthTaxi Cab Scheme[icpcarchive:3126]
dinicFast Maximum Flow[spoj:FASTFLOW]
dist gridA Famous Grid[spoj:SPIRALGR]
input outputEnormous Input Test[spoj:INTEST]
eratostheneThe Spiral of Primes[icpcarchive:2120]
eratosthenePrime or Not[spoj:PON]
eratostheneBazinga![spoj:DCEPC505]
eulerian tourGoldbach graphs[spoj:GOLDG]
eulerian tourFree Tour[spoj:FTOUR]
fast exponentiationThe last digit[spoj:LASTDIG]
fast exponentiationTiling a Grid With Dominoes[spoj:GNY07H]
floyd warshallRoads in Berland[spoj:CT25C]
ford fulkersonPotholers[spoj:POTHOLE]
ford fulkersonMaximum Flow[spoj:FLOW]
gale shapleyStable Marriage Problem[spoj:STABLEMP]
gauss jordanArs Longa[icpcarchive:3563]
gauss jordanLinear Equation Solver[spoj:LINQSOLV]
greedyMinimum Scalar Product[gcj:2008round1A]
greedyMinimal Coverage[timus:1303]
graph01KATHTHI[spoj:KATHTHI]
huffmanHuffman Trees[poj:1261]
huffmanVariable Radix Huffman Encoding[spoj:VHUFFM]
intervals coverRadar Installation[onlinejudge:1193]
introIt can be arranged[kattis:itcanbearranged]
introRicochet Robots[kattis:ricochetrobots]
k-sum4 Values whose Sum is 0[poj:2785]
kadaneMaximum Sum Sequences[spoj:MAXSUMSQ]
kadaneLargest Rectangle[codechef:LARGEST]
knapsackThe Knapsack Problem[spoj:KNAPSACK]
knapsackKnapsack[spoj:KNPSACK]
knuth morris prattFind the maximal product of string prefixes[codility:carbo2013]
knuth morris prattA Needle in the Haystack[spoj:NHAY]
knuth morris prattPower strings[kattis:powerstrings]
knuth morris prattPeriod[spoj:PERIOD]
kruskalCobbled streets[spoj:CSTREET]
kruskalMinimum Spanning Tree[spoj:MST]
kuhn munkresSelfish Cities[spoj:SCITIES]
levenshteinPhilosophers Stone[spoj:BYTESM2]
levenshteinEdit distance[spoj:EDIST]
levenshteinAdvanced Edit Distance[spoj:ADVEDIST]
longest common subsequenceLongest Common Substring[spoj:LCS]
longest increasing subsequenceEasy Longest Increasing Subsequence[spoj:ELIS]
lowest common ancestorLowest Common Ancestor[spoj:LCA]
manacherLongest Palindromic Substring[spoj:LPS]
manacherCasting Spells[kattis:castingspells]
matrix chain multMixtures[spoj:Mixtures]
matrix chain multThe Safe Secret[kattis:safesecret]
matrix chain multSweet and Sour Rock[spoj:ROCK]
merge ordered listsMergesort[spoj:MERGSORT]
min cutLandscaping[kattis:landscaping]
min cutCoconuts[spoj:COCONUTS]
min mean cycleWord Rings[spoj:WORDRING]
next permutationThe Next Permutation[spoj:NEXT]
next permutationGreat Swerc[spoj:SWERC14A]
shortest paths variantsAlmost Shortest Path[spoj:SAMER08A]
shortest paths variantsFlowery Trails[kattis:flowerytrails]
longest path in treeLabyrinth[spoj:LABYR1]
longest path in treeLongest path in a tree[spoj:PT07Z]
longest path in treeSpeedCameras[codility:calcium2015]
polygonToil for Oil[spoj:OIL]
predictive textT9[poj:1451]
dynamic programmingFibonacci Sum[spoj:FIBOSUM]
rabin karpLongest Common Substring[spoj:LCS]
range minimum queryNegative Score[spoj:RPLN]
rectangles from histogramLargest Rectangle in a Histogram[spoj:HISTOGRA]
rectangles from histogramGalerie d'art[prologin:2012:galerie]
rectangles from pointsRectangle[spoj:HMSRECT]
squares from gridMaking Chess Boards[spoj:CT101CC]
strongly connected componentsCapital City[spoj:CAPCITY]
structuresEncryption[spoj:CENCRY]
structuresPhone List[spoj:PHONELST]
structuresA concrete simulation[spoj:ACS]
structuresHavannah[gcj:2013round3B]
subsetsumBoat Burglary[spoj:BURGLARY]
sudokuEasy sudoku[spoj:EASUDOKU]
sweeplineBack to the future[prologin:demi2012]
topological orderTopological Sorting[spoj:TOPOSORT]
topological orderProject File Dependencies[spoj:PFDEP]
topological orderAll Disks Considered[spoj:ALL]
traveling salesmanSmall TSP[spoj:STSP]
traveling salesmanCollecting Beepers[kattis:beepers]
traveling salesmanMenu tour[spoj:MENUTOUR]
sortingSpelling Lists[spoj:MIB]
sortingYodaness Level[spoj:YODANESS]
trieSpell checker[icpcarchive:3872]
two satManhattan[kattis:manhattan]
two satSoldiers on Parade[spoj:SOPARADE]
union disjoint rectanglesCity Park[icpcarchive:6889]
windows k distinctÉpiphanie[prologin:2011:epiphanie]