Use these filters to narrow down your next problem to solve:

OJ: , Topic: , Quality:

You can now sort these problems based on Distinct ACcepted Users (DACU) column.

Generally, problems with high DACU are the easier problems.

Note that we only update DACU column manually (not a live data).

As Kattis users, you can also sort these problems based Kattis points (usually correlated with DACU but not always).

Generally, problems with low Kattis points are the easier problems.

Note that we only update Point column manually (not a live data).

For Kattis and Google Chrome users, install Kattis Hint Giver created by one of my student Lin Si Jie that integrates this page directly with Kattis problems pages**All** of the easiest 820 problems (range: [1.2..3.5] points, average at 2.35 points) have hints and solving them all gives you 820*~2.35 = 1927 total Kattis points — The Lower Bound of Programming Contests in the 2020s.

Tips: You may want to occasionally 'Remove from Chrome' and re-'Add to Chrome' to manually sync this Methods to Solve content with the local cache.

Kattis | Problem Title | CP4 | Hint | DACU | Point |
---|---|---|---|---|---|

mnist10class | mnist10class | non-starred |
partial scoring problem - neural network | 258 | 8.3 |

mnist2class | mnist2class | non-starred |
partial scoring problem - neural network | 242 | 8.0 |

mwvc | mwvc | non-starred |
optimization problem involving large MWVC instance up to N ≤ 4000. To get high score for this problem, you need to us... | 48 | 9.6 |

tsp | tsp | non-starred |
optimization problem involving large TSP instance up to N ≤ 1000. To get high score for this problem, you need to use... | 1334 | 9.6 |

carrots | carrots | 1.4a, I/O + Sequences Only | just print P | 15155 | 1.3 |

faktor | faktor | 1.4a, I/O + Sequences Only | just print (I-1)*A+1 | 8022 | 1.2 |

greetings2 | greetings2 | 1.4a, I/O + Sequences Only | just reprint the input as requested | 589 | 1.3 |

hello | hello | 1.4a, I/O + Sequences Only | just print "Hello World!" | 39217 | 1.2 |

jackolanternjuxtaposition | jackolanternjuxtaposition | 1.4a, I/O + Sequences Only | just print N*T*M | 53 | 1.7 |

planina | planina | 1.4a, I/O + Sequences Only | just print (2^N+1)^2; OEIS A028400 | 5965 | 1.3 |

r2 | r2 | 1.4a, I/O + Sequences Only | just print 2*S-R1 | 14929 | 1.2 |

romans | romans | 1.4a, I/O + Sequences Only | just print round(X * 1087.7626) | 2088 | 1.4 |

thelastproblem | thelastproblem | 1.4a, I/O + Sequences Only | S can have space(s) | 76 | 1.8 |

different | different | 1.4b, Repetition Only | use abs function per test case | 8964 | 2.3 |

jumbojavelin | jumbojavelin | 1.4b, Repetition Only | sum and offset by (N-1) | 112 | 1.5 |

qaly | qaly | 1.4b, Repetition Only | trivial loop | 5955 | 1.2 |

tarifa | tarifa | 1.4b, Repetition Only | one pass; array not needed | 9768 | 1.3 |

timeloop | timeloop | 1.4b, Repetition Only | just print 'num Abracadabra' N times | 17170 | 1.3 |

conteststruggles | conteststruggles | 1.4c, Selection Only | simple formula; check if answer in [0..100] | 101 | 1.9 |

fyi | fyi | 1.4c, Selection Only | if-else; 2 cases; output 1/0 if the input starts with '555'/not, respectively | 90 | 1.6 |

isithalloween | isithalloween | 1.4c, Selection Only | if-else; 2 cases | 3761 | 1.3 |

judgingmoose | judgingmoose | 1.4c, Selection Only | if-else if-else; 3 cases | 4516 | 1.4 |

moscowdream | moscowdream | 1.4c, Selection Only | if-else; 2 cases; check n ≥ 3 | 443 | 1.7 |

onechicken | onechicken | 1.4c, Selection Only | if-else if-else; 4 cases (piece vs pieces) | 3014 | 1.6 |

provincesandgold | provincesandgold | 1.4c, Selection Only | if-else if-else; 6 cases | 1779 | 1.4 |

quadrant | quadrant | 1.4c, Selection Only | if-else if-else; 4 cases | 13625 | 1.3 |

temperature | temperature | 1.4c, Selection Only | if-else if-else; 3 cases; derive formula | 685 | 2.2 |

vajningsplikt | vajningsplikt | 1.4c, Selection Only | selection; multiple cases; be careful | 114 | 1.8 |

astrologicalsign | astrologicalsign | 1.4d, Multiple TC + Selection | 12 cases (Capricorn is a bit different) | 226 | 1.6 |

eligibility | eligibility | 1.4d, Multiple TC + Selection | 3 cases | 1741 | 1.6 |

helpaphd | helpaphd | 1.4d, Multiple TC + Selection | 2 cases | 2044 | 1.6 |

leftbeehind | leftbeehind | 1.4d, Multiple TC + Selection | 4 cases | 2014 | 1.6 |

nastyhacks | nastyhacks | 1.4d, Multiple TC + Selection | 3 cases | 6308 | 1.3 |

numberfun | numberfun | 1.4d, Multiple TC + Selection | 2 cases (out of 6 combinations; addition/multiplication are commutative); remember integer division | 3436 | 1.4 |

oddities | oddities | 1.4d, Multiple TC + Selection | 2 cases | 11523 | 1.3 |

babybites | babybites | 1.4e, Control Flow | easy simulation | 1624 | 1.7 |

basketballoneonone | basketballoneonone | 1.4e, Control Flow | linear pass | 957 | 1.6 |

brokencalculator | brokencalculator | 1.4e, Control Flow | trivial; just do as asked | 13 | 3.7 |

cold | cold | 1.4e, Control Flow | linear pass; array not really needed | 12609 | 1.3 |

earlywinter | earlywinter | 1.4e, Control Flow | linear pass | 543 | 1.9 |

fizzbuzz | fizzbuzz | 1.4e, Control Flow | actually just about easy divisibility properties | 10274 | 1.3 |

fromatob | fromatob | 1.4e, Control Flow | we can only go up via (a bunch of) +1 move(s); we can only go down via (an optional +1 move to make even) and then divid... | 44 | 3.1 |

jobexpenses | jobexpenses | 1.4e, Control Flow | simple loop | 1427 | 1.4 |

licensetolaunch | licensetolaunch | 1.4e, Control Flow | easy linear pass | 1969 | 1.4 |

oddgnome | oddgnome | 1.4e, Control Flow | linear pass | 2388 | 1.6 |

speeding | speeding | 1.4e, Control Flow | just loop; keep the running max | 84 | 1.4 |

speedlimit | speedlimit | 1.4e, Control Flow | standard simulation problem | 7164 | 1.4 |

spellingbee | spellingbee | 1.4e, Control Flow | trivial; just do as asked; string property checks | 17 | 3.2 |

stararrangements | stararrangements | 1.4e, Control Flow | one loop | 1637 | 1.4 |

statistics | statistics | 1.4e, Control Flow | one pass; array not needed | 2942 | 1.7 |

thanos | thanos | 1.4e, Control Flow | simple simulation; R is at least 2 | 335 | 3.2 |

tornbygge | tornbygge | 1.4e, Control Flow | linear pass | 272 | 1.8 |

zanzibar | zanzibar | 1.4e, Control Flow | one pass; array not needed | 2308 | 1.5 |

abc | abc | 1.4f, Function | sort 3 numbers into ABC; then print output as needed | 5282 | 1.8 |

artichoke | artichoke | 1.4f, Function | LA 7150 - WorldFinals Marrakech15; linear scan; probably one of the easiest WorldFinals problem; also available at UVa 0... | 1390 | 2.8 |

combinationlock | combinationlock | 1.4f, Function | simple; do as asked; also available at UVa 10550 - Combination Lock | 633 | 2.5 |

digits | digits | 1.4f, Function | direct simulation; also available at UVa 11687 - Digits | 214 | 3.5 |

filip | filip | 1.4f, Function | create a 'reverse string' function; then if-else check | 6345 | 1.3 |

mia | mia | 1.4f, Function | just if-else check | 1136 | 2.1 |

sifferprodukt | sifferprodukt | 1.4f, Function | easy digit product function | 460 | 1.5 |

treasurehunt | treasurehunt | 1.4f, Function | simple simulation on 2D grid | 1006 | 2.6 |

acm | acm | 1.4g, 1D Array, Easier | simple simulation; one pass | 3526 | 1.5 |

cetiri | cetiri | 1.4g, 1D Array, Easier | sort 3 number helps; 3 cases | 1165 | 1.9 |

finalexam2 | finalexam2 | 1.4g, 1D Array, Easier | compare array with itself (but shifted by one index) | 378 | 1.3 |

forcedchoice | forcedchoice | 1.4g, 1D Array, Easier | simple in-small-array test | 205 | 1.3 |

hothike | hothike | 1.4g, 1D Array, Easier | one pass; using array helps a bit | 835 | 1.7 |

lineup | lineup | 1.4g, 1D Array, Easier | sort ascending/descending and compare | 3703 | 1.6 |

lostlineup | lostlineup | 1.4g, 1D Array, Easier | simple 1D array manipulation | 550 | 1.5 |

ofugsnuid | ofugsnuid | 1.4g, 1D Array, Easier | simple list reversal problem; one liner with Python | 636 | 1.4 |

trainboarding | trainboarding | 1.4g, 1D Array, Easier | simulation with arrays | 58 | 3.0 |

vaccineefficacy | vaccineefficacy | 1.4g, 1D Array, Easier | use small arrays; just compute as described | 102 | 2.6 |

armystrengtheasy | armystrengtheasy | 1.4h, Easy | also see Kattis - armystrengthhard | 1585 | 2.1 |

armystrengthhard | armystrengthhard | 1.4h, Easy | also see Kattis - armystrengtheasy; re-read the problem statement several times to unveil a trivial solution | 1466 | 2.2 |

batterup | batterup | 1.4h, Easy | easy one loop | 4542 | 1.3 |

brokenswords | brokenswords | 1.4h, Easy | easy counting problem | 367 | 1.7 |

drinkingsong | drinkingsong | 1.4h, Easy | just one loop; but be careful of with the grammar | 336 | 2.4 |

hangingout | hangingout | 1.4h, Easy | simple loop | 2218 | 1.3 |

hissingmicrophone | hissingmicrophone | 1.4h, Easy | simple loop | 7690 | 1.3 |

methodicmultiplication | methodicmultiplication | 1.4h, Easy | reading comprehension; very easy answer | 381 | 1.6 |

mosquito | mosquito | 1.4h, Easy | direct simulation | 822 | 1.9 |

nop | nop | 1.4h, Easy | one loop; simply count and modify distances between two UPPERCASE characters | 94 | 2.1 |

pokerhand | pokerhand | 1.4h, Easy | frequency count; report max | 2173 | 1.4 |

ptice | ptice | 1.4h, Easy | just a simple simulation | 2100 | 1.5 |

sevenwonders | sevenwonders | 1.4h, Easy | one pass | 4776 | 1.4 |

stopwatch | stopwatch | 1.4h, Easy | linear pass; simulation | 390 | 1.3 |

volim | volim | 1.4h, Easy | simple simulation | 1855 | 1.7 |

yinyangstones | yinyangstones | 1.4h, Easy | trick question; just check if number of whites equals to number of blacks | 1365 | 1.8 |

architecture | architecture | 1.4i, Still Easy | 2D array problem with an easy two 1D arrays solution | 78 | 2.7 |

bossbattle | bossbattle | 1.4i, Still Easy | trick question | 1391 | 1.8 |

boundingrobots | boundingrobots | 1.4i, Still Easy | maintain separate variables | 1141 | 1.6 |

bubbletea | bubbletea | 1.4i, Still Easy | simple simulation | 806 | 2.2 |

climbingstairs | climbingstairs | 1.4i, Still Easy | observation: go to office (k), go to registration desk (r), go up/down 1 floor until you reach n steps, go home; repetit... | 210 | 4.1 |

deathtaxes | deathtaxes | 1.4i, Still Easy | direct simulation; a bit of reading comprehension | 179 | 3.3 |

driversdilemma | driversdilemma | 1.4i, Still Easy | only 6 different cases; note that starting fuel is C/2 | 200 | 2.0 |

eventplanning | eventplanning | 1.4i, Still Easy | just simulate; 2D loop | 458 | 2.0 |

exactlyelectrical | exactlyelectrical | 1.4i, Still Easy | Manhattan distance; waste energy at the end by moving 1 cell around target | 469 | 2.0 |

missingnumbers | missingnumbers | 1.4i, Still Easy | two linear loops; use a small array of Booleans | 1622 | 1.7 |

peasoup | peasoup | 1.4i, Still Easy | one linear pass | 771 | 2.4 |

prerequisites | prerequisites | 1.4i, Still Easy | process the requirements as the input is read; also available at UVa 10919 - Prerequisites? | 284 | 1.9 |

sok | sok | 1.4i, Still Easy | case analysis | 750 | 1.7 |

vote | vote | 1.4i, Still Easy | follow the requirements | 1584 | 2.2 |

anotherbrick | anotherbrick | 1.4j, Medium | simple simulation | 1424 | 1.9 |

basicprogramming1 | basicprogramming1 | 1.4j, Medium | a nice summative problem for programming examination of a basic programming methodology course | 201 | 4.0 |

battlesimulation | battlesimulation | 1.4j, Medium | one pass; special check on 3! = 6 possible combinations of 3 combo moves | 900 | 2.8 |

beekeeper | beekeeper | 1.4j, Medium | single loop; be careful that vowel set here includes 'y' | 1025 | 2.7 |

bitsequalizer | bitsequalizer | 1.4j, Medium | analyzing patterns; also available at UVa 12545 - Bits Equalizer | 174 | 4.5 |

bottledup | bottledup | 1.4j, Medium | find integer a and b so that a*v1 + b*v2 == s; single loop | 637 | 2.6 |

carousel | carousel | 1.4j, Medium | single loop; keep best; skip a > m | 335 | 2.8 |

climbingworm | climbingworm | 1.4j, Medium | simulation; similar with UVa 00573 - The Snail | 222 | 2.4 |

codecleanups | codecleanups | 1.4j, Medium | a bit tricky | 515 | 2.4 |

cowcrane | cowcrane | 1.4j, Medium | reading comprehension; case analysis; eventually there are only 4 possible cases | 181 | 3.9 |

fastfood | fastfood | 1.4j, Medium | eventually just one pass due to the constraints | 330 | 2.2 |

howl | howl | 1.4j, Medium | simply extend the input by one correct character; case analysis exercise | 288 | 1.8 |

shatteredcake | shatteredcake | 1.4j, Medium | sum the area of the pieces and relate it with L*W | 957 | 1.6 |

bela | bela | 1.6a, Game (Card) | simple card scoring problem | 3731 | 1.3 |

karte | karte | 1.6a, Game (Card) | simple | 1600 | 1.7 |

memorymatch | memorymatch | 1.6a, Game (Card) | interesting simulation game; many corner cases | 161 | 4.0 |

shuffling | shuffling | 1.6a, Game (Card) | simulate card shuffling operation | 218 | 2.8 |

bijele | bijele | 1.6b, Game (Chess) | super simple | 10381 | 1.4 |

chess | chess | 1.6b, Game (Chess) | bishop movements; either impossible, 0, 1, or 2 ways - one of this can be invalid; just use brute force | 856 | 2.9 |

empleh | empleh | 1.6b, Game (Chess) | the reverse problem of Kattis - helpme | 245 | 1.8 |

helpme | helpme | 1.6b, Game (Chess) | convert the given chess board into chess notation | 302 | 2.4 |

hexagonalrooks | hexagonalrooks | 1.6b, Game (Chess) | count number of two consecutive rook movements on hexagonal grid; try all possible 91 (intermediate) cells after simplif... | 18 | 3.2 |

connectthedots | connectthedots | 1.6c, Game (Others), Easier | classic children game; output formatting | 213 | 3.6 |

gamerank | gamerank | 1.6c, Game (Others), Easier | simulate the ranking update process | 732 | 3.9 |

guessinggame | guessinggame | 1.6c, Game (Others), Easier | use a 1D flag array; also available at UVa 10530 - Guessing Game | 684 | 2.7 |

trik | trik | 1.6c, Game (Others), Easier | simple simulation game | 7191 | 1.4 |

battleship | battleship | 1.6d, Game (Others), Harder | simulation; reading comprehension; many corner cases | 120 | 5.4 |

rockpaperscissors | rockpaperscissors | 1.6d, Game (Others), Harder | count wins and losses; output win average; also available at UVa 10903 - Rock-Paper-Scissors ... | 820 | 3.7 |

rockscissorspaper | rockscissorspaper | 1.6d, Game (Others), Harder | 2D arrays manipulation; also available at UVa 10443 - Rock, Scissors, Paper | 153 | 4.8 |

tictactoe2 | tictactoe2 | 1.6d, Game (Others), Harder | check validity of Tic Tac Toe game; tricky; also available at UVa 10363 - Tic Tac Toe | 167 | 5.3 |

turtlemaster | turtlemaster | 1.6d, Game (Others), Harder | interesting board game to teach programming for children; simulation | 323 | 2.9 |

calories | calories | 1.6e, Real Life, Easier | are you concerned with your weights?; also available at UVa 10554 - Calories from Fat | 328 | 2.0 |

chopin | chopin | 1.6e, Real Life, Easier | you can learn a bit of music with this problem | 823 | 1.8 |

compass | compass | 1.6e, Real Life, Easier | your typical smartphone's compass function usually has this small feature | 1529 | 2.0 |

fbiuniversal | fbiuniversal | 1.6e, Real Life, Easier | a bit of base number conversion; base 27 to base 10, if valid | 369 | 2.2 |

heartrate | heartrate | 1.6e, Real Life, Easier | real life problem | 3205 | 1.3 |

measurement | measurement | 1.6e, Real Life, Easier | going down: multiply; going up: divide | 641 | 2.0 |

parking | parking | 1.6e, Real Life, Easier | a possible real life application; simple loops and if-statements are enough to solve this problem | 1523 | 1.6 |

trainpassengers | trainpassengers | 1.6e, Real Life, Easier | create a verifier; be careful of corner cases | 1807 | 2.1 |

transitwoes | transitwoes | 1.6e, Real Life, Easier | a possible real life scenario; simulate as asked | 353 | 1.3 |

wertyu | wertyu | 1.6e, Real Life, Easier | use 2D mapper array to simplify the problem; also available at UVa 10082 - WERTYU | 768 | 2.9 |

beatspread | beatspread | 1.6f, Real Life, Medium | be careful with boundary cases!; also available at UVa 10812 - Beat the Spread | 980 | 2.4 |

dodecaphony | dodecaphony | 1.6f, Real Life, Medium | music lesson; do as asked | 98 | 3.2 |

luhnchecksum | luhnchecksum | 1.6f, Real Life, Medium | very similar (~95%) to UVa 11743 | 836 | 1.6 |

musicalscales | musicalscales | 1.6f, Real Life, Medium | music lesson; use array(s) to help simplify the code | 674 | 1.6 |

recipes | recipes | 1.6f, Real Life, Medium | real life problem for a cook; just simulate the requirements | 731 | 1.8 |

score | score | 1.6f, Real Life, Medium | medium difficulty; do as asked; just be careful | 173 | 3.5 |

toilet | toilet | 1.6f, Real Life, Medium | simulation; be careful of corner cases | 1756 | 2.4 |

wordcloud | wordcloud | 1.6f, Real Life, Medium | just a simulation; but be careful of corner cases | 322 | 2.4 |

bungeejumping | bungeejumping | 1.6g, Real Life, Harder | real life Physics simulation; need someone who is good with Physics to understand the problem and derive the required fo... | 64 | 4.8 |

creditcard | creditcard | 1.6g, Real Life, Harder | real life issue; precision error issue if we do not convert double (with just 2 digits after decimal point) into long lo... | 123 | 6.3 |

saxophone | saxophone | 1.6g, Real Life, Harder | about musical instruments; also available at UVa 10415 - Eb Alto Saxophone Player | 268 | 2.4 |

tenis | tenis | 1.6g, Real Life, Harder | Tennis scoring rules; tricky test cases; be careful | 78 | 5.0 |

touchscreenkeyboard | touchscreenkeyboard | 1.6g, Real Life, Harder | follow the requirements; sort | 636 | 1.9 |

workout | workout | 1.6g, Real Life, Harder | gym simulation; use 1D arrays to help you simulate the time quickly | 151 | 5.7 |

datum | datum | 1.6h, Time, Easier | Java GregorianCalendar, DAY_OF_WEEK | 3019 | 1.4 |

friday | friday | 1.6h, Time, Easier | the answer depends on the start day of the month | 1059 | 1.9 |

justaminute | justaminute | 1.6h, Time, Easier | linear pass; total seconds/(total minutes*60) | 1512 | 1.7 |

marswindow | marswindow | 1.6h, Time, Easier | simple advancing of year and month by 26 months or 2 years+2 months each; direct formula exists | 830 | 2.0 |

savingdaylight | savingdaylight | 1.6h, Time, Easier | convert hh:mm to minute; compute difference of ending and starting; then convert minute to hh:mm again | 986 | 2.1 |

spavanac | spavanac | 1.6h, Time, Easier | convert hh:mm to minute, reduce by 45 minutes, then convert minute to hh:mm again | 8877 | 1.4 |

bestbefore | bestbefore | 1.6i, Time, Harder | tedious; 3! = 6 possibilities to check | 148 | 4.0 |

birthdayboy | birthdayboy | 1.6i, Time, Harder | convert mm-dd into [0..364]; use DAT; find largest gap via brute force | 108 | 4.6 |

busyschedule | busyschedule | 1.6i, Time, Harder | sort the time; be careful of corner cases | 811 | 2.4 |

dst | dst | 1.6i, Time, Harder | straightforward; modulo | 611 | 2.1 |

natrij | natrij | 1.6i, Time, Harder | convert hh:mm:ss to seconds; make sure the second time is larger than the first time; corner case: 24:00:00 | 1136 | 2.6 |

semafori | semafori | 1.6i, Time, Harder | simple simulation | 724 | 2.0 |

tgif | tgif | 1.6i, Time, Harder | given the day of 1 Jan of an unspecified year, find the DAY_OF_WEEK of another day of that year; use Java GregorianCalen... | 82 | 3.2 |

timezones | timezones | 1.6i, Time, Harder | follow the description, tedious; also available at UVa 10371 - Time Zones | 67 | 5.3 |

rimski | rimski | 1.6j, Roman Numerals | to Roman/to Decimal conversion problem; use next permutation to be sure | 118 | 4.5 |

romanholidays | romanholidays | 1.6j, Roman Numerals | generate and sort the first 1K Roman strings; ''M'' is at index 945; append prefix 'M' for numbers larger than 1K | 92 | 3.6 |

conundrum | conundrum | 1.6k, Cipher, Easier | simple cipher | 5240 | 1.4 |

drmmessages | drmmessages | 1.6k, Cipher, Easier | simple decrypt; follow instruction | 1949 | 1.6 |

drunkvigenere | drunkvigenere | 1.6k, Cipher, Easier | simple decrypt; reverse the given instruction | 189 | 1.5 |

encodedmessage | encodedmessage | 1.6k, Cipher, Easier | simple 2D grid cipher | 2316 | 1.4 |

kemija08 | kemija08 | 1.6k, Cipher, Easier | simple vowel checks | 3070 | 1.4 |

keytocrypto | keytocrypto | 1.6k, Cipher, Easier | simple decrypt | 1029 | 1.7 |

reverserot | reverserot | 1.6k, Cipher, Easier | simple cipher | 2641 | 1.7 |

runlengthencodingrun | runlengthencodingrun | 1.6k, Cipher, Easier | encode and decode | 1929 | 1.7 |

t9spelling | t9spelling | 1.6k, Cipher, Easier | similar to (the reverse of) UVa 12896 | 2425 | 1.7 |

anewalphabet | anewalphabet | 1.6l, Cipher, Medium | simple cipher; 26 characters | 4154 | 1.8 |

falsesecurity | falsesecurity | 1.6l, Cipher, Medium | a bit tedious decoder problem | 948 | 1.6 |

permcode | permcode | 1.6l, Cipher, Medium | reading comprehension problem | 166 | 2.2 |

piglatin | piglatin | 1.6l, Cipher, Medium | simple; check the vowels that include 'y' and process it | 916 | 2.1 |

secretmessage | secretmessage | 1.6l, Cipher, Medium | just do as asked; use 2D grid | 2866 | 1.7 |

tajna | tajna | 1.6l, Cipher, Medium | simple 2D grid cipher | 471 | 2.1 |

autori | autori | 1.6m, Input Parsing (Iter) | simple string tokenizer problem | 11602 | 1.2 |

genealogical | genealogical | 1.6m, Input Parsing (Iter) | iterative parser; need to be careful when trimming the tokens; do not print new line as the last line; otherwise this is... | 77 | 3.5 |

pervasiveheartmonitor | pervasiveheartmonitor | 1.6m, Input Parsing (Iter) | simple parsing; then finding average | 950 | 1.7 |

timebomb | timebomb | 1.6m, Input Parsing (Iter) | just a tedious input parsing problem; divisibility by 6 | 1174 | 1.8 |

tripletexting | tripletexting | 1.6m, Input Parsing (Iter) | print characters that appear at least two times out of three | 56 | 1.8 |

display | display | 1.6n, Output Formatting, E | unordered_map; map a digit -> enlarged 7x5 version | 635 | 2.5 |

krizaljka | krizaljka | 1.6n, Output Formatting, E | simple 2D character array formatting | 483 | 1.8 |

mirror | mirror | 1.6n, Output Formatting, E | simple 2D character array formatting | 1757 | 1.7 |

multiplication | multiplication | 1.6n, Output Formatting, E | tedious time waster output formatting problem | 162 | 2.2 |

musicalnotation | musicalnotation | 1.6n, Output Formatting, E | simple but tedious | 421 | 2.0 |

okvir | okvir | 1.6n, Output Formatting, E | simple 2D output formatting problem | 399 | 2.0 |

okviri | okviri | 1.6n, Output Formatting, E | use 2D array to simplify the process | 447 | 1.9 |

skener | skener | 1.6n, Output Formatting, E | enlarging 2D character array | 2067 | 1.5 |

asciiaddition | asciiaddition | 1.6o, Time Waster, Easier | a+b problem in text format; total gimmick; time waster | 509 | 1.9 |

averagespeed | averagespeed | 1.6o, Time Waster, Easier | distance = speed*time elapsed; also available at UVa 10281 - Average Speed | 322 | 3.7 |

gerrymandering | gerrymandering | 1.6o, Time Waster, Easier | just a reading comprehension problem; do as asked | 1187 | 1.4 |

glitchbot | glitchbot | 1.6o, Time Waster, Easier | time waster; O(n^2) simulation; do not output more than one possible answer | 1036 | 2.0 |

pachydermpeanutpacking | pachydermpeanutpacking | 1.6o, Time Waster, Easier | time waster; simple one loop simulation | 322 | 1.9 |

printingcosts | printingcosts | 1.6o, Time Waster, Easier | clear time waster; the hard part is in parsing the costs of each character in the problem description | 705 | 2.2 |

froggie | froggie | 1.6p, Time Waster, Harder | just a simulation; but many corner cases; S can be 0 | 296 | 6.8 |

functionalfun | functionalfun | 1.6p, Time Waster, Harder | just follow the description; 5 cases; tedious parsing problem; requires a kind of mapper | 487 | 1.9 |

interpreter | interpreter | 1.6p, Time Waster, Harder | need careful implementation; just follow the instruction | 224 | 3.7 |

lumbercraft | lumbercraft | 1.6p, Time Waster, Harder | time waster; 2D grid simulation | 69 | 5.0 |

sabor | sabor | 1.6p, Time Waster, Harder | ad hoc; hard simulation; analyze that the simulation terminates | 53 | 5.2 |

windows | windows | 1.6p, Time Waster, Harder | LA 7162 - WorldFinals Marrakech15; tedious simulation problem; also available at UVa 01721 - Window Manager | 92 | 7.6 |

baloni | baloni | 2.2a, 1D Array, Medium | clever use of 1D histogram array to decompose the shots as per requirement | 689 | 3.5 |

downtime | downtime | 2.2a, 1D Array, Medium | 1D array; use Fenwick Tree-like operation for Range Update Point Query | 1068 | 3.2 |

erase | erase | 2.2a, 1D Array, Medium | if N is odd, the second line has to be the inverse of the first; if N is even, both lines have to be the same | 2166 | 1.6 |

fluortanten | fluortanten | 2.2a, 1D Array, Medium | remove Bjorn first; then do O(n) pass to check where is Bjorn's optimal position | 181 | 3.1 |

greedilyincreasing | greedilyincreasing | 2.2a, 1D Array, Medium | just 1D array manipulation; this is not the DP-LIS problem | 1151 | 1.9 |

jollyjumpers | jollyjumpers | 2.2a, 1D Array, Medium | 1D Boolean flags to check [1..n-1]; also available at UVa 10038 - Jolly Jumpers | 413 | 3.4 |

astro | astro | 2.2b, 1D Array, Harder | use large Boolean array | 115 | 4.3 |

crashingrobots | crashingrobots | 2.2b, 1D Array, Harder | just simulate the x/y/direction of the N robots | 107 | 4.6 |

divideby100 | divideby100 | 2.2b, 1D Array, Harder | big 1D character array processing; be careful | 557 | 4.2 |

flippingpatties | flippingpatties | 2.2b, 1D Array, Harder | use 1D int array of size 43 201; at each time t, we need one cook (hand) at time t-2d (to start), t-d (to flip), ... | 116 | 2.4 |

inverteddeck | inverteddeck | 2.2b, 1D Array, Harder | can we sort the array with just one contiguous swap?; compress duplicates; use sentinel so that we only check /&bsol... | 203 | 3.7 |

keypad | keypad | 2.2b, 1D Array, Harder | 2D array manipulation | 200 | 3.3 |

mastermind | mastermind | 2.2b, 1D Array, Harder | 1D array manipulation to count r and s | 446 | 2.4 |

physicalmusic | physicalmusic | 2.2b, 1D Array, Harder | a reading comprehension problem to come up with a simple algorithm to determine the answer | 168 | 5.5 |

piperotation | piperotation | 2.2b, 1D Array, Harder | use 1D Boolean array to check if cell (r, c) needs to be connected from the top (r-1) or left (c-1) and pass information... | 50 | 2.6 |

pivot | pivot | 2.2b, 1D Array, Harder | static range min/max query problem; special condition allows this problem to be solvable in O(n) using help of 1D arrays | 1723 | 3.2 |

queens | queens | 2.2b, 1D Array, Harder | simple N queens verifier program; use several 1D Boolean arrays to help do this check in O(N) | 725 | 3.3 |

rockband | rockband | 2.2b, 1D Array, Harder | interesting usage of 1D array to simplify the solution; a bit of sorting to arrange the output | 194 | 3.9 |

upsanddownsofinvesting | upsanddownsofinvesting | 2.2b, 1D Array, Harder | simplify by a factor of two by realizing that peaks and valleys are symmetrical | 147 | 3.6 |

compromise | compromise | 2.2c, 2D Array, Easier | 2D array manipulation; take the majority bits of each column; output either 0 or 1 for ties | 363 | 2.2 |

epigdanceoff | epigdanceoff | 2.2c, 2D Array, Easier | count number of CCs on 2D grid; simpler solution exists: count the number of blank columns plus one | 505 | 1.9 |

flowshop | flowshop | 2.2c, 2D Array, Easier | interesting 2D array manipulation | 392 | 2.5 |

imageprocessing | imageprocessing | 2.2c, 2D Array, Easier | interesting 2D array manipulation | 344 | 2.1 |

nineknights | nineknights | 2.2c, 2D Array, Easier | 2D array checks; 8 directions | 881 | 1.9 |

thisaintyourgrandpascheckerboard | thisaintyourgrandpaschecke... | 2.2c, 2D Array, Easier | simple 2D array manipulation | 578 | 1.6 |

2048 | 2048 | 2.2d, 2D Array, Harder | just a 2D array manipulation problem; utilize symmetry using 90 degrees rotation(s) to reduce 4 cases into 1 | 3150 | 2.1 |

apples | apples | 2.2d, 2D Array, Harder | 2D array manipulation; gravity simulation | 439 | 3.6 |

falcondive | falcondive | 2.2d, 2D Array, Harder | 2D array manipulation; translation vector of the Falcon | 64 | 2.8 |

flagquiz | flagquiz | 2.2d, 2D Array, Harder | array of array of strings; be careful; duplicates may exists | 167 | 3.7 |

funhouse | funhouse | 2.2d, 2D Array, Harder | 2D array manipulation; note the direction update | 700 | 2.0 |

prva | prva | 2.2d, 2D Array, Harder | 2D array manipulation; check vertically and horizontally | 756 | 1.7 |

rings2 | rings2 | 2.2d, 2D Array, Harder | more challenging 2D array manipulation; special output formatting style | 385 | 3.8 |

tetris | tetris | 2.2d, 2D Array, Harder | actually 3D pattern array to simulate various shape positions | 322 | 1.8 |

basicprogramming2 | basicprogramming2 | 2.2e, Sorting, Easier | a nice problem about basic sorting applications | 189 | 3.4 |

closingtheloop | closingtheloop | 2.2e, Sorting, Easier | sort first | 1415 | 1.6 |

cups | cups | 2.2e, Sorting, Easier | a bit of string parsing; sort | 2987 | 1.5 |

height | height | 2.2e, Sorting, Easier | insertion sort simulation | 899 | 2.0 |

judging | judging | 2.2e, Sorting, Easier | sort DOM judge and Kattis outputs; then do the O(n) merge procedure of mergesort to count common outputs | 1183 | 2.5 |

mjehuric | mjehuric | 2.2e, Sorting, Easier | a direct simulation of a bubble sort algorithm | 1349 | 1.6 |

musicaltrees | musicaltrees | 2.2e, Sorting, Easier | sort p and t; then just simulate as asked with Boolean array | 23 | 2.8 |

sidewayssorting | sidewayssorting | 2.2e, Sorting, Easier | stable_sort or sort multi-fields of columns of a 2D array; ignore case | 857 | 2.0 |

addemup | addemup | 2.2f, Sorting, Harder | create a helper function to read digits upside down; add all possibilities; sort; then use fast O(n) target pair solutio... | 338 | 4.4 |

booking | booking | 2.2f, Sorting, Harder | 2 events per booking (need room and release room); convert to minutes; be careful of leap year on 2016; sort the events;... | 164 | 5.4 |

chartingprogress | chartingprogress | 2.2f, Sorting, Harder | sort using modified comparison function (by column); transpose the input | 757 | 2.2 |

classy | classy | 2.2f, Sorting, Harder | sort using modified comparison function; a bit of string parsing/tokenization | 1633 | 4.5 |

dirtydriving | dirtydriving | 2.2f, Sorting, Harder | sort; find max - derive the formula; reading comprehension problem | 279 | 2.1 |

dyslectionary | dyslectionary | 2.2f, Sorting, Harder | sort the reverse of original string; output formatting | 775 | 3.4 |

gearchanging | gearchanging | 2.2f, Sorting, Harder | generate all O(N*M) possible gear ratios; sort; check consecutive ratios (it is ok to have duplicates) | 161 | 3.2 |

includescoring | includescoring | 2.2f, Sorting, Harder | sort; custom comparison function, tedious | 342 | 3.7 |

lawnmower | lawnmower | 2.2f, Sorting, Harder | sort and check if Guido covers all land (end-to-end and side-to-side); also available at UVa 12269 - Land Mower | 448 | 2.1 |

longswaps | longswaps | 2.2f, Sorting, Harder | observation: if k ≤ n/2, output 'Yes'; otherwise the middle chars at s[n-k..k-1] cannot move; sort s and compare the ... | 172 | 3.3 |

musicyourway | musicyourway | 2.2f, Sorting, Harder | stable_sort; custom comparison function | 404 | 2.4 |

sortofsorting | sortofsorting | 2.2f, Sorting, Harder | stable_sort or sort multi-fields | 2667 | 2.2 |

zipfsong | zipfsong | 2.2f, Sorting, Harder | sort; custom comparison function; zipf law | 209 | 4.5 |

bread | bread | 2.2g, Special Sorting | inversion index; hard to derive | 249 | 5.0 |

excursion | excursion | 2.2g, Special Sorting | inversion index; requires O(n log n) merge sort | 387 | 4.3 |

froshweek | froshweek | 2.2g, Special Sorting | requires O(n log n) merge sort; 64-bit integer; also available at UVa 11858 - Frosh Week | 694 | 5.6 |

gamenight | gamenight | 2.2g, Special Sorting | Counting Sort is a subproblem; count frequency of A/B/Cs; complete search AA..ABB..BCC..C or AA..ACC..CBB..B | 70 | 2.8 |

mali | mali | 2.2g, Special Sorting | Counting Sort two arrays; greedy matching largest+smallest at that point | 97 | 5.1 |

sort | sort | 2.2g, Special Sorting | Counting Sort variant | 318 | 2.3 |

ultraquicksort | ultraquicksort | 2.2g, Special Sorting | requires O(n log n) merge sort; also available at UVa 10810 - Ultra Quicksort | 180 | 5.2 |

bitbybit | bitbybit | 2.2h, Bit Manipulation | be very careful with and + or corner cases | 955 | 2.9 |

bits | bits | 2.2h, Bit Manipulation | use GNU C++ __builtin_popcount | 1066 | 2.6 |

deathstar | deathstar | 2.2h, Bit Manipulation | can be solved with bit manipulation | 415 | 2.0 |

hypercube | hypercube | 2.2h, Bit Manipulation | given a gray code; we can binary search its index: upper half/first digit 0 and bottom half/first digit 1 | 376 | 3.0 |

iboard | iboard | 2.2h, Bit Manipulation | simulation; LSB to MSB; all ASCII values are 7-bits; we may need to add leading zeroes | 363 | 2.3 |

snappereasy | snappereasy | 2.2h, Bit Manipulation | see Kattis - snapperhard | 424 | 2.7 |

snapperhard | snapperhard | 2.2h, Bit Manipulation | bit manipulation; find the pattern; the easier version is also available at Kattis - snappereasy | 501 | 2.3 |

zebrasocelots | zebrasocelots | 2.2h, Bit Manipulation | zebra is 1; ocelot is 0; simulation of long long | 563 | 3.2 |

buka | buka | 2.2i, Big Integer | a trivial problem if we use Python or Java BigInteger | 152 | 1.8 |

disastrousdoubling | disastrousdoubling | 2.2i, Big Integer | simulation; wrong answer if not using Big Integer | 324 | 3.7 |

generalizedrecursivefunctions | generalizedrecursivefuncti... | 2.2i, Big Integer | direct implementation of the given generalized recursive functions; but using Big Integer | 141 | 3.9 |

primaryarithmetic | primaryarithmetic | 2.2i, Big Integer | not a Big Integer problem but a simulation of basic addition | 399 | 2.7 |

simpleaddition | simpleaddition | 2.2i, Big Integer | that A+B on BigInteger question | 1913 | 1.9 |

threepowers | threepowers | 2.2i, Big Integer | Big Integer is for 3^n; binary rep of set; also available at UVa 10669 - Three powers | 700 | 2.6 |

wizardofodds | wizardofodds | 2.2i, Big Integer | if K is bigger than 350, the answer is clear; else just check if 2^K ≥ N | 488 | 2.6 |

dream | dream | 2.2j, Stack | stack simulation; reading comprehension problem, need other fast DS for mapping strings to indices | 219 | 6.4 |

evenup | evenup | 2.2j, Stack | use stack to solve this problem | 1273 | 2.7 |

pairingsocks | pairingsocks | 2.2j, Stack | simulation using two stacks; just do as asked | 556 | 3.0 |

restaurant | restaurant | 2.2j, Stack | simulation with stack-based concept; drop plates at stack 2 (LIFO); use move 2-$gt;1 to reverse order; take from stack 1... | 364 | 4.5 |

reversebinary | reversebinary | 2.2j, Stack | decimal to binary; reverse it; binary to decimal | 7144 | 1.5 |

symmetricorder | symmetricorder | 2.2j, Stack | use stack to help reverse even-indexed names | 3584 | 1.5 |

thegrandadventure | thegrandadventure | 2.2j, Stack | stack simulation | 348 | 2.0 |

throwns | throwns | 2.2j, Stack | use stack of egg positions to help with the undo operation; be careful of corner cases involving modulo operation | 1091 | 2.6 |

bungeebuilder | bungeebuilder | 2.2k, Stack-based Problems | clever usage of stack; linear pass; bracket (mountain) matching variant | 83 | 3.3 |

circuitmath | circuitmath | 2.2k, Stack-based Problems | postfix calculator problem | 918 | 2.4 |

delimitersoup | delimitersoup | 2.2k, Stack-based Problems | bracket matching; stack | 382 | 1.9 |

backspace | backspace | 2.2l, List/Queue/Deque | we can use deque (or vector) to help solve this problem | 2517 | 3.0 |

ferryloading3 | ferryloading3 | 2.2l, List/Queue/Deque | simulation with queue; also available at UVa 10901 - Ferry Loading III | 368 | 3.6 |

ferryloading4 | ferryloading4 | 2.2l, List/Queue/Deque | simulation with queue; also available at UVa 11034 - Ferry Loading IV | 703 | 3.6 |

foosball | foosball | 2.2l, List/Queue/Deque | queue simulation; tedious | 186 | 3.7 |

integerlists | integerlists | 2.2l, List/Queue/Deque | use deque for fast deletion from front (normal) & back (reversed list); use stack to reverse the final list if it is... | 882 | 4.8 |

joinstrings | joinstrings | 2.2l, List/Queue/Deque | all '+' operations must be O(1) | 959 | 4.1 |

lyklagangriti | lyklagangriti | 2.2l, List/Queue/Deque | use list and its iterator; very similar to Kattis - sim | 114 | 2.7 |

server | server | 2.2l, List/Queue/Deque | one first come first serve pass; we can use queue although overkill | 3331 | 1.9 |

sim | sim | 2.2l, List/Queue/Deque | use list and its iterator | 99 | 2.0 |

teque | teque | 2.2l, List/Queue/Deque | all operations must be O(1) | 766 | 3.3 |

trendingtopic | trendingtopic | 2.2l, List/Queue/Deque | use queue of length 7 to maintain words in the past 7 days, unordered_map to count frequencies, sort to format the outpu... | 181 | 5.8 |

alehouse | alehouse | 2.3a, Priority Queue | discretize the events; PQ simulation | 223 | 4.6 |

clinic | clinic | 2.3a, Priority Queue | interesting PQ simulation; reverse thinking; project to time 0 | 165 | 3.0 |

guessthedatastructure | guessthedatastructure | 2.3a, Priority Queue | stack, queue, and priority_queue; also available at UVa 11995 - I Can Guess ... | 2148 | 2.5 |

janeeyre | janeeyre | 2.3a, Priority Queue | simulate Anna's reading behavior with PQ; the input parsing is tedious | 79 | 4.8 |

jugglingpatterns | jugglingpatterns | 2.3a, Priority Queue | PQ simulation; reading comprehension | 48 | 6.3 |

knigsoftheforest | knigsoftheforest | 2.3a, Priority Queue | PQ simulation after sorting the entries by year | 184 | 3.6 |

numbertree | numbertree | 2.3a, Priority Queue | not a direct priority queue problem, but the indexing strategy is similar to binary heap indexing | 1760 | 2.1 |

rationalsequence2 | rationalsequence2 | 2.3a, Priority Queue | the L/R pattern can be easily derived and indexing strategy is similar to binary heap indexing | 1388 | 1.5 |

rationalsequence3 | rationalsequence3 | 2.3a, Priority Queue | the reverse problem of rationalsequence2 | 587 | 1.8 |

stockprices | stockprices | 2.3a, Priority Queue | PQ simulation; both max and min PQ | 109 | 3.7 |

alphabetspam | alphabetspam | 2.3b, DAT, ASCII | count the frequencies of lowercase, uppercase, and whitespace characters | 3902 | 1.4 |

keyboardd | keyboardd | 2.3b, DAT, ASCII | frequency counting of A-Zs and spaces | 92 | 2.0 |

quickbrownfox | quickbrownfox | 2.3b, DAT, ASCII | pangram; frequency counting of 26 alphabets | 4433 | 1.6 |

soundex | soundex | 2.3b, DAT, ASCII | DAT for soundex A-Z code mapping; also available at UVa 10260 - Soundex | 106 | 2.9 |

bookingaroom | bookingaroom | 2.3c, DAT, Others | only 100 rooms; use 1D Boolean array | 2849 | 1.7 |

busnumbers | busnumbers | 2.3c, DAT, Others | only 1000 bus numbers; use 1D Boolean array | 2776 | 2.4 |

freefood | freefood | 2.3c, DAT, Others | only 365 days in a year | 1965 | 1.5 |

hardware | hardware | 2.3c, DAT, Others | parsing is tedious; count the frequency of digits | 244 | 2.0 |

heimavinna | heimavinna | 2.3c, DAT, Others | DAT of 1000 problems | 431 | 1.4 |

princesspeach | princesspeach | 2.3c, DAT, Others | DAT; linear pass | 839 | 2.1 |

relocation | relocation | 2.3c, DAT, Others | just use DAT | 1112 | 1.5 |

bard | bard | 2.3d, Hash Table (set) | use one unordered_set per villager; simulate the singing process | 637 | 2.6 |

boatparts | boatparts | 2.3d, Hash Table (set) | use unordered_set | 1398 | 1.6 |

cd | cd | 2.3d, Hash Table (set) | unordered_set is faster than set here; or use modified merge as the input is sorted; also available at UVa 11849 - CD | 3176 | 5.3 |

deduplicatingfiles | deduplicatingfiles | 2.3d, Hash Table (set) | use vector to store the strings; unordered_set to store unique strings; and complete search to compare the n^2 hash code... | 583 | 4.4 |

engineeringenglish | engineeringenglish | 2.3d, Hash Table (set) | use unordered_set to remember duplicated words; transform to lowercase | 1627 | 2.2 |

esej | esej | 2.3d, Hash Table (set) | use unordered_set to prevent duplicate | 509 | 3.3 |

everywhere | everywhere | 2.3d, Hash Table (set) | use unordered_set | 7015 | 1.4 |

greetingcard | greetingcard | 2.3d, Hash Table (set) | use unordered_set; good question; major hint: only 12 neighbors | 607 | 4.9 |

icpcawards | icpcawards | 2.3d, Hash Table (set) | use unordered_set; print first 12 distinct Universities (and their first teams) | 2167 | 1.4 |

iwannabe | iwannabe | 2.3d, Hash Table (set) | sort Pokenoms based on each stat; pick top K ids and put in an unordered_set; report final size of unordered_set | 739 | 2.5 |

keywords | keywords | 2.3d, Hash Table (set) | pre-process the strings; put inside unordered_set; report final size | 349 | 2.3 |

nodup | nodup | 2.3d, Hash Table (set) | use unordered_set; string | 3564 | 1.3 |

oddmanout | oddmanout | 2.3d, Hash Table (set) | use unordered_set to find and eliminate pairs | 4450 | 1.5 |

pizzahawaii | pizzahawaii | 2.3d, Hash Table (set) | use Python to help with (unordered) set intersection and difference operations | 335 | 2.6 |

proofs | proofs | 2.3d, Hash Table (set) | parsing; use unordered_set to store past conclusions; a few corner cases | 48 | 2.4 |

securedoors | securedoors | 2.3d, Hash Table (set) | use unordered_set to keep track of the people | 2108 | 1.8 |

shiritori | shiritori | 2.3d, Hash Table (set) | linear pass; use unordered_set to keep track of words that have been called | 295 | 2.9 |

shoppinglist | shoppinglist | 2.3d, Hash Table (set) | simple set intersection problem | 16 | 4.4 |

shoppinglisteasy | shoppinglisteasy | 2.3d, Hash Table (set) | see Kattis - shoppinglist | 23 | 3.4 |

upprodun | upprodun | 2.3d, Hash Table (set) | not really a Hash Table problem but uses Hash Table concept; the number of teams in each room is the 'load factor' of th... | 197 | 1.9 |

whatdoesthefoxsay | whatdoesthefoxsay | 2.3d, Hash Table (set) | use unordered_set to record excluded sounds | 2578 | 2.1 |

babelfish | babelfish | 2.3e, Hash Table (map), E | a pure dictionary problem; use unordered_map; also available at UVa 10282 - Babelfish | 2835 | 2.3 |

competitivearcadebasketball | competitivearcadebasketbal... | 2.3e, Hash Table (map), E | use unordered_map | 209 | 2.8 |

conformity | conformity | 2.3e, Hash Table (map), E | use unordered_map to count frequencies of the sorted permutations of 5 ids; also available at UVa 11286 - Conformity | 1100 | 1.9 |

costumecontest | costumecontest | 2.3e, Hash Table (map), E | use unordered_map to map frequency of each category; get the minimum one; print output lexicographically | 532 | 2.0 |

election2 | election2 | 2.3e, Hash Table (map), E | frequency counting; be careful of tie breaker | 166 | 2.4 |

grandpabernie | grandpabernie | 2.3e, Hash Table (map), E | use unordered_map plus (sorted) vector | 1065 | 3.2 |

haypoints | haypoints | 2.3e, Hash Table (map), E | use unordered_map to deal with Hay Points dictionary; also available at UVa 10295 - Hay Points | 1055 | 2.0 |

marko | marko | 2.3e, Hash Table (map), E | frequency counting with unordered_map | 495 | 1.9 |

metaprogramming | metaprogramming | 2.3e, Hash Table (map), E | use unordered_map; somewhat similar with Kattis - addingwords | 820 | 2.4 |

recount | recount | 2.3e, Hash Table (map), E | use map; frequency counting | 1163 | 2.0 |

rollcall | rollcall | 2.3e, Hash Table (map), E | use unordered_map to count frequency; sort | 530 | 2.4 |

variablearithmetic | variablearithmetic | 2.3e, Hash Table (map), E | use unordered_map as mapper | 394 | 2.6 |

addingwords | addingwords | 2.3f, Hash Table (map), H | use unordered_map | 1880 | 3.9 |

awkwardparty | awkwardparty | 2.3f, Hash Table (map), H | use unordered_map to running max and running min; report the largest difference | 611 | 3.0 |

basicinterpreter | basicinterpreter | 2.3f, Hash Table (map), H | the harder version of Kattis - variablearithmetic; tedious; be careful; print string inside double quotes verbatim | 152 | 6.7 |

conversationlog | conversationlog | 2.3f, Hash Table (map), H | use combo DS: unordered_map, set, plus (sorted) vector | 507 | 2.8 |

iforaneye | iforaneye | 2.3f, Hash Table (map), H | use unordered_map to map the various rules mentioned in the problem description; tedious | 143 | 5.0 |

magicalcows | magicalcows | 2.3f, Hash Table (map), H | use unordered_map of farm size to frequency; small simulation; but since C is small, we can also use DAT | 257 | 4.6 |

minorsetback | minorsetback | 2.3f, Hash Table (map), H | use unordered_map of string to another unordered_map of int to string; need a bit of music theory to solve the problem; ... | 147 | 3.6 |

parallelanalysis | parallelanalysis | 2.3f, Hash Table (map), H | reading comprehension; use unordered_map to map memory address to last time it is written | 80 | 4.8 |

recenice | recenice | 2.3f, Hash Table (map), H | use unordered_map to prepare pronunciation of [1..999]; precalculate the answer afterwards using another unordered_map | 225 | 3.1 |

snowflakes | snowflakes | 2.3f, Hash Table (map), H | use unordered_map to record the occurrence index of a certain snowflake size; use this to determine the answer in linear... | 404 | 4.4 |

bst | bst | 2.3g, Balanced BST (set) | simulate special BST [1..N] insertions using set | 449 | 7.3 |

caching | caching | 2.3g, Balanced BST (set) | combo ds (unordered_map and set) | 210 | 5.8 |

candydivision | candydivision | 2.3g, Balanced BST (set) | complete search from 1 to sqrt(N); insert all divisors into set for automatic sorting and elimination of duplicates | 702 | 3.4 |

compoundwords | compoundwords | 2.3g, Balanced BST (set) | use set extensively; iterator | 1807 | 1.7 |

coursescheduling | coursescheduling | 2.3g, Balanced BST (set) | keep (ordered) set of courses and (unordered) map of course to students taking the course | 40 | 3.1 |

ministryofmagic | ministryofmagic | 2.3g, Balanced BST (set) | simulate directly, use of queue and set (PQ with update key/increase key; use STL set) | 63 | 6.0 |

missinggnomes | missinggnomes | 2.3g, Balanced BST (set) | use set to keep ordered list of missing gnomes | 659 | 2.6 |

palindromicpassword | palindromicpassword | 2.3g, Balanced BST (set) | there are not more than 900 3-digits number; generate all and store them in a (sorted) set; find ceil and floor of input... | 431 | 3.3 |

raidteams | raidteams | 2.3g, Balanced BST (set) | use more than one PQs that can support erase operation | 75 | 3.5 |

administrativeproblems | administrativeproblems | 2.3h, Balanced BST (map) | use several maps as the output (of spy names) has to be sorted; be careful of corner cases | 194 | 6.3 |

baconeggsandspam | baconeggsandspam | 2.3h, Balanced BST (map) | use map; sort | 1712 | 1.6 |

cakeymccakeface | cakeymccakeface | 2.3h, Balanced BST (map) | map differences to frequencies; return the one with maximum frequency and if ties, the smallest difference | 197 | 3.8 |

doctorkattis | doctorkattis | 2.3h, Balanced BST (map) | Max Priority Queue with frequent (increaseKey) updates; use map | 114 | 4.7 |

fantasydraft | fantasydraft | 2.3h, Balanced BST (map) | use map to keep ordering; simulate; need to erase | 111 | 4.0 |

fodelsedagsmemorisering | fodelsedagsmemorisering | 2.3h, Balanced BST (map) | use map; sorted output | 289 | 1.8 |

hardwoodspecies | hardwoodspecies | 2.3h, Balanced BST (map) | use map; sorted output; also available at UVa 10226 - Hardwood Species | 378 | 2.7 |

kattissquest | kattissquest | 2.3h, Balanced BST (map) | use map of priority queues; other solutions exist | 834 | 3.1 |

notamused | notamused | 2.3h, Balanced BST (map) | use map; sorted output | 601 | 2.0 |

opensource | opensource | 2.3h, Balanced BST (map) | use map and set to check previous strings; order needed; also available at UVa 11239 - Open Source | 291 | 3.3 |

problemclassification | problemclassification | 2.3h, Balanced BST (map) | mapper; frequency counting | 345 | 3.1 |

srednji | srednji | 2.3h, Balanced BST (map) | go left and right of B; use fast data structure like map to help determine the result fast | 164 | 4.1 |

warehouse | warehouse | 2.3h, Balanced BST (map) | use unordered_map and multimap | 920 | 2.1 |

zoo | zoo | 2.3h, Balanced BST (map) | parsing; keep last token; tolower; frequency counting with map; order needed | 1499 | 1.7 |

babynames | babynames | 2.3i, Order Statistics Tree | dynamic rank problem; use two pb_ds | 87 | 5.5 |

continuousmedian | continuousmedian | 2.3i, Order Statistics Tree | dynamic selection problem; specifically the median values; pb_ds helps | 140 | 3.9 |

cookieselection | cookieselection | 2.3i, Order Statistics Tree | map large integers to up to 600K integers; use pb_ds or Fenwick Tree and the select(median) operation of Fenwick Tree | 923 | 4.3 |

gcpc | gcpc | 2.3i, Order Statistics Tree | dynamic rank problem; pb_ds helps | 876 | 5.3 |

abinitio | abinitio | 2.4a, Graph Data Structures | combo: EL input, AM as working graph DS, AL output (in hash format); all operations must be O(V) or better | 104 | 7.3 |

alphabetanimals | alphabetanimals | 2.4a, Graph Data Structures | somewhat an Adjacency List data structure | 478 | 3.4 |

chopwood | chopwood | 2.4a, Graph Data Structures | Prüfer sequence; use priority_queue | 258 | 3.5 |

flyingsafely | flyingsafely | 2.4a, Graph Data Structures | trivial solution exists | 1421 | 1.7 |

railroad | railroad | 2.4a, Graph Data Structures | do as asked; graph DS modification; bypass vertices with degree 2 | 95 | 6.3 |

traveltheskies | traveltheskies | 2.4a, Graph Data Structures | (graph) DS manipulation; an array of ALs (one per each day); simulate the number of people day by day | 188 | 3.2 |

weakvertices | weakvertices | 2.4a, Graph Data Structures | graph edge existence checks | 1775 | 1.5 |

almostunionfind | almostunionfind | 2.4b, Union-Find | new operation: move; idea: do not destroy the parent array structure; also available at UVa 11987 - Almost Union-Find | 618 | 7.0 |

bridgesandtunnels | bridgesandtunnels | 2.4b, Union-Find | map buildings to integer IDs; UFDS; size of set | 57 | 3.2 |

chatter | chatter | 2.4b, Union-Find | UFDS simulation using random number generation | 59 | 3.1 |

control | control | 2.4b, Union-Find | LA 7480 - Singapore15; simulation of UFDS; size of set; number of disjoint sets | 424 | 4.6 |

forests | forests | 2.4b, Union-Find | merge two disjoint sets if they are consistent; also available at UVa 10227 - Forests | 127 | 3.0 |

ladice | ladice | 2.4b, Union-Find | size of set; decrement one per usage | 615 | 2.8 |

more10 | more10 | 2.4b, Union-Find | UFDS; a bit of string processing; tedious | 94 | 7.1 |

skolavslutningen | skolavslutningen | 2.4b, Union-Find | group classes that share the same column into the same CC; report number of CCs | 152 | 1.9 |

swaptosort | swaptosort | 2.4b, Union-Find | it boils down to finding CCs of 1 with N-1; 2 with N-2; and so on... | 423 | 3.9 |

tildes | tildes | 2.4b, Union-Find | basic UFDS with size of set query | 165 | 2.6 |

unionfind | unionfind | 2.4b, Union-Find | basic UFDS; similar to UVa 00793 | 1086 | 4.8 |

virtualfriends | virtualfriends | 2.4b, Union-Find | maintain set attribute (size) in rep item; also available at UVa 11503 - Virtual Friends | 1078 | 3.9 |

fenwick | fenwick | 2.4c, Tree-related DS | basic Fenwick Tree; use long long | 695 | 4.5 |

justforsidekicks | justforsidekicks | 2.4c, Tree-related DS | use six Fenwick Trees, one for each gem type | 103 | 4.9 |

moviecollection | moviecollection | 2.4c, Tree-related DS | LA 5902 - NorthWesternEurope11; not a stack but a dynamic RSQ problem; also available at UVa 01513 - Movie collection | 547 | 5.5 |

supercomputer | supercomputer | 2.4c, Tree-related DS | easy problem if we use Fenwick Tree | 760 | 3.8 |

turbo | turbo | 2.4c, Tree-related DS | somewhat similar with UVa 01513/Kattis - moviecollection; use DAT (for mapping) and Fenwick Tree (for RSQ) | 507 | 4.3 |

worstweather | worstweather | 2.4c, Tree-related DS | store the year+rain data in a (sorted) array; binary search; Segment Tree/Sparse Table: static RMaxQueries | 118 | 7.7 |

4thought | 4thought | 3.2a, Pre-calculate-able | brute force 4^3 possibilities; integer division; pre-calculate | 2353 | 2.8 |

cardtrick2 | cardtrick2 | 3.2a, Pre-calculate-able | n <= 13, we can simulate the process using queue and precalculate all 13 possible answers | 869 | 1.6 |

chocolates | chocolates | 3.2a, Pre-calculate-able | RxC ≤ 16; use iterative bitmask to try all combinations; test combination with 2 floodfills (on 1s/chocolates and on ... | 48 | 5.0 |

foolingaround | foolingaround | 3.2a, Pre-calculate-able | there are only 379 different values of N where Bob wins; pre-calculateable | 117 | 5.8 |

gridmagic | gridmagic | 3.2a, Pre-calculate-able | run a complete search solution and pre-calculate the answers | 104 | 2.2 |

lastfactorialdigit | lastfactorialdigit | 3.2a, Pre-calculate-able | very easy due to small range of N; pre-calculateable | 4942 | 1.3 |

luckynumber | luckynumber | 3.2a, Pre-calculate-able | there is an increasing and decreasing output pattern; for N > 25, the answer is 0; for N ∈ [2..25], use naive brut... | 275 | 4.7 |

mancala | mancala | 3.2a, Pre-calculate-able | we can generate all possible winnable Mancala boards from smaller Mancala boards | 320 | 1.7 |

primematrix | primematrix | 3.2a, Pre-calculate-able | Notice that we can just find 1 row answer for 2 ≤ n ≤ 50; then store the results; we can use this to generate the ... | 140 | 4.2 |

sgcoin | sgcoin | 3.2a, Pre-calculate-able | we can either brute force short string message; precompute all possible hash values; or come up with O(1) solution | 271 | 2.4 |

8queens | 8queens | 3.2b, Iterative (Two Loops) | classic 8-Queens problem; write a checker | 2385 | 3.2 |

antiarithmetic | antiarithmetic | 3.2b, Iterative (Two Loops) | 2 nested loops with pruning can still pass the time limit; compare this with UVa 11129; also available at UVa 10730 - An... | 195 | 7.3 |

bestrelayteam | bestrelayteam | 3.2b, Iterative (Two Loops) | sort runners based on flying start times; brute force first runner and pick top 3 other flying start runners | 1420 | 1.9 |

bikegears | bikegears | 3.2b, Iterative (Two Loops) | 2D nested loops; sort the output | 185 | 5.4 |

blackfriday | blackfriday | 3.2b, Iterative (Two Loops) | 2D nested loops; frequency counting | 2384 | 2.2 |

closestsums | closestsums | 3.2b, Iterative (Two Loops) | sort and then do O(n^2) pairings; also available at UVa 10487 - Closest Sums | 1105 | 2.9 |

golombrulers | golombrulers | 3.2b, Iterative (Two Loops) | 2D nested loops; additional 1D loops for checking | 297 | 3.2 |

kafkaesque | kafkaesque | 3.2b, Iterative (Two Loops) | 2D nested loops; simple | 293 | 1.7 |

liga | liga | 3.2b, Iterative (Two Loops) | 2D nested loops; interesting logic game; each team is independent; if number played and number loss both not defined, as... | 71 | 6.1 |

majstor | majstor | 3.2b, Iterative (Two Loops) | for the second output line; just try each of 'S', 'P', or 'R' at every round and take the max | 101 | 1.9 |

peg | peg | 3.2b, Iterative (Two Loops) | 2D nested loops; try all possible moves | 931 | 1.8 |

pet | pet | 3.2b, Iterative (Two Loops) | very simple 2D nested loops problem | 7932 | 1.4 |

putovanje | putovanje | 3.2b, Iterative (Two Loops) | clever problem with hint that masks possible brute force solution; just use 2D nested loops | 413 | 2.5 |

reduction | reduction | 3.2b, Iterative (Two Loops) | 2 nested loops; with sorting; also available at UVa 10670 - Work Reduction | 119 | 5.8 |

register | register | 3.2b, Iterative (Two Loops) | clever problem with hint that masks possible brute force solution; just use 2D nested loops | 583 | 2.1 |

summertrip | summertrip | 3.2b, Iterative (Two Loops) | 3 loops TLE; clever 2D nested loops; try all possible ending index i; use DAT to remember the latest lowest starting ind... | 632 | 2.4 |

telephones | telephones | 3.2b, Iterative (Two Loops) | brute force; check intervals; also available at UVa 12205 - Happy Telephones | 302 | 2.6 |

tourdefrance | tourdefrance | 3.2b, Iterative (Two Loops) | brute force plus sorting; also available at UVa 11242 - Tour de France | 354 | 2.7 |

cudoviste | cudoviste | 3.2c, Three+ Nested Loops, E | 4 nested loops; the inner loops is just 2x2; 5 possibilities of crushed cars; skip 2x2 area that contains building | 1194 | 1.4 |

mathhomework | mathhomework | 3.2c, Three+ Nested Loops, E | 3 nested loops | 257 | 2.1 |

npuzzle | npuzzle | 3.2c, Three+ Nested Loops, E | 4 nested loops; easy | 683 | 2.2 |

patuljci | patuljci | 3.2c, Three+ Nested Loops, E | 3 nested loops; n = 9 | 1123 | 1.8 |

safehouses | safehouses | 3.2c, Three+ Nested Loops, E | 4 nested loops | 261 | 3.1 |

set | set | 3.2c, Three+ Nested Loops, E | 4 nested loops; easy | 364 | 1.8 |

calculatingdartscores | calculatingdartscores | 3.2d, Three+ Nested Loops, H | 6 nested loops but easy; see if a*i +b*j + c*k == n | 752 | 2.8 |

goblingardenguards | goblingardenguards | 3.2d, Three+ Nested Loops, H | 3 nested loops; use 2D Boolean array to avoid over counting | 345 | 6.1 |

lektira | lektira | 3.2d, Three+ Nested Loops, H | 2 nested loops to try all 2 cutting points plus 1 more loop to actually do the reversing of sub words | 376 | 3.2 |

medals | medals | 3.2d, Three+ Nested Loops, H | not an easy problem; require analysis to realize that the search space is small; also available at UVa 10997 - Medals | 69 | 5.9 |

misa | misa | 3.2d, Three+ Nested Loops, H | 4 nested loops; grid; check to 8 directions | 502 | 2.2 |

tautology | tautology | 3.2d, Three+ Nested Loops, H | try all 2^5 = 32 values with pruning; also available at UVa 11108 - Tautology | 160 | 3.4 |

classpicture | classpicture | 3.2e, Iterative (Permutation) | try all permutation; filter forbidden pairs; fast simulation | 157 | 6.9 |

dancerecital | dancerecital | 3.2e, Iterative (Permutation) | try all R! permutations; compare adjacent routines | 274 | 4.2 |

dreamer | dreamer | 3.2e, Iterative (Permutation) | try all 8! permutations of digits; check if the date is valid; output earliest valid date | 406 | 2.0 |

towering | towering | 3.2e, Iterative (Permutation) | try all 6! permutations; get the one that works | 986 | 2.1 |

veci | veci | 3.2e, Iterative (Permutation) | try all permutations; get the one that is larger than X | 1193 | 1.8 |

victorythroughsynergy | victorythroughsynergy | 3.2e, Iterative (Permutation) | try all 10! team formations; get the one that works | 60 | 4.3 |

buildingboundaries | buildingboundaries | 3.2f, Iterative (Combination) | try all 2^3 = 8 orientations of 3 buildings; 3 horizontal packing; 3 vertical packing; 3! = 3 of 1 building on top of 2 ... | 207 | 3.4 |

doubleplusgood | doubleplusgood | 3.2f, Iterative (Combination) | only up to 2^17 possible combinations; use to_string and stoll | 228 | 2.8 |

geppetto | geppetto | 3.2f, Iterative (Combination) | try all 2^N subsets of ingredients | 305 | 3.3 |

perket | perket | 3.2f, Iterative (Combination) | try all 2^N subsets of ingredients | 511 | 2.2 |

squaredeal | squaredeal | 3.2f, Iterative (Combination) | try all 3! permutations of rectangles and try all 2^3 combinations of rectangle orientations; test figure 1.a and 1.b co... | 232 | 4.6 |

zagrade | zagrade | 3.2f, Iterative (Combination) | try all subsets of bracket pairs to be removed | 298 | 3.1 |

communication | communication | 3.2g, Try All Answers | try all possible bytes; apply the bitmask formula | 764 | 2.0 |

cookingwater | cookingwater | 3.2g, Try All Answers | try all possible answers | 446 | 2.0 |

flexible | flexible | 3.2g, Try All Answers | try all possible answers | 2354 | 1.7 |

heirsdilemma | heirsdilemma | 3.2g, Try All Answers | try all possible answers; small range; avoid division by zero (this digit is not used) | 821 | 1.6 |

islands | islands | 3.2g, Try All Answers | try all possible subsets; prune the non-contiguous ones (only 55 valid bitmasks between [0..1023]); check the 'island' p... | 443 | 2.6 |

owlandfox | owlandfox | 3.2g, Try All Answers | try all answers; complete search | 743 | 1.8 |

parking2 | parking2 | 3.2g, Try All Answers | try all possible parking spaces; pick the best | 2049 | 1.4 |

prinova | prinova | 3.2g, Try All Answers | sort first, then try all possible answers, which are the values in betweens two even boy 'names' and values around A, A+... | 96 | 4.2 |

savingforretirement | savingforretirement | 3.2g, Try All Answers | try all possible answers; small constraint | 1248 | 1.7 |

walls | walls | 3.2g, Try All Answers | try whether the answer is 1/2/3/4; or Impossible; use up to 4 nested loops | 513 | 4.0 |

aboveaverage | aboveaverage | 3.2h, Math Simulation, Easier | compute average; see how many are above it; also available at UVa 10370 - Above Average | 3190 | 2.0 |

damagedequation | damagedequation | 3.2h, Math Simulation, Easier | try all 4*4 = 16 possibilities and test them | 62 | 2.1 |

dicecup | dicecup | 3.2h, Math Simulation, Easier | complete search; use map - order needed; pick the sum with the max frequency | 5454 | 1.2 |

easiest | easiest | 3.2h, Math Simulation, Easier | complete search; sum of digit | 3991 | 1.6 |

growlinggears | growlinggears | 3.2h, Math Simulation, Easier | physics of parabola; derivation; try all gears | 496 | 2.4 |

harshadnumbers | harshadnumbers | 3.2h, Math Simulation, Easier | sum of digits; brute force | 1715 | 1.4 |

powersof2easy | powersof2easy | 3.2h, Math Simulation, Easier | try all integers in [0..n]; convert to string; search for 2^e as substring | 13 | 3.5 |

socialrunning | socialrunning | 3.2h, Math Simulation, Easier | try all possible starting runner; first and last runners will run alone at first and last segment, respectively | 138 | 1.8 |

sodaslurper | sodaslurper | 3.2h, Math Simulation, Easier | similar to UVa 10346; also available at UVa 11689 - Soda Surpler | 1920 | 1.6 |

somesum | somesum | 3.2h, Math Simulation, Easier | use complete search to get the answer | 575 | 1.8 |

sumoftheothers | sumoftheothers | 3.2h, Math Simulation, Easier | parsing; try each number as the sum; sum the rest | 1261 | 1.9 |

tri | tri | 3.2h, Math Simulation, Easier | brute force all possibilities | 3924 | 1.6 |

trollhunt | trollhunt | 3.2h, Math Simulation, Easier | brute force; simple | 976 | 2.6 |

videospeedup | videospeedup | 3.2h, Math Simulation, Easier | brute force; simple for loop; do as asked | 298 | 2.0 |

zamka | zamka | 3.2h, Math Simulation, Easier | Sum of Digit problem; brute force is sufficient | 5255 | 1.4 |

crackingrsa | crackingrsa | 3.2i, Math Simulation, Harder | a bit number theory; solvable with complete search | 258 | 2.3 |

disgruntledjudge | disgruntledjudge | 3.2i, Math Simulation, Harder | brute force constants a and b between [0..10â€‰000] and do O(n) checks; break early as soon as a solution is found; also... | 76 | 3.3 |

falling | falling | 3.2i, Math Simulation, Harder | rework the formula; complete search up to sqrt(D) | 588 | 3.1 |

houselawn | houselawn | 3.2i, Math Simulation, Harder | just do ask asked; use long long | 313 | 3.4 |

lipschitzconstant | lipschitzconstant | 3.2i, Math Simulation, Harder | sort; brute force; math observation | 253 | 4.6 |

milestones | milestones | 3.2i, Math Simulation, Harder | brute force all possibilities, use floating point fraction as both numerator and denominator are very high | 137 | 2.8 |

repeatingdecimal | repeatingdecimal | 3.2i, Math Simulation, Harder | simulate the process until we have printed c digits; append trailing zeroes if necessary | 397 | 3.6 |

robotopia | robotopia | 3.2i, Math Simulation, Harder | 2 linear equations; 2 unknowns; small range | 582 | 6.2 |

thanosthehero | thanosthehero | 3.2i, Math Simulation, Harder | for-loop from backwards | 320 | 3.9 |

coconut | coconut | 3.2j, Josephus Problem | maintain a circular linked list of hand symbols; variant of Josephus problem; other solution exists | 636 | 1.6 |

eenymeeny | eenymeeny | 3.2j, Josephus Problem | Josephus problem; small n; just simulate | 492 | 1.7 |

musicalchairs | musicalchairs | 3.2j, Josephus Problem | Josephus variant; brute force | 139 | 4.0 |

toys | toys | 3.2j, Josephus Problem | use general case Josephus recurrence | 142 | 4.5 |

goodmorning | goodmorning | 3.2k, Backtracking (Easier) | we can use backtracking to generate all possible (small) numbers that can be pressed according to the constraints | 347 | 2.7 |

gradecurving | gradecurving | 3.2k, Backtracking (Easier) | try all possible answers; function grows fast to 100 | 170 | 4.5 |

natjecanje | natjecanje | 3.2k, Backtracking (Easier) | 4 options for each team with kayak: do nothing, pass to left (if damaged), keep to self (if damaged), pass to right (if ... | 701 | 2.5 |

paintings | paintings | 3.2k, Backtracking (Easier) | try all possible paintings based on Catherine's preference; skip hideous color pairs | 162 | 3.6 |

carvet | carvet | 3.2l, Backtracking (Harder) | backtrack; similar to Kattis - solitaire; checkers jumping style | 120 | 3.9 |

dobra | dobra | 3.2l, Backtracking (Harder) | try all possible 3^n changes of '_' (to a vowel, an 'L', or other consonant not 'L'); prune invalid states; count valid ... | 44 | 3.9 |

fruitbaskets | fruitbaskets | 3.2l, Backtracking (Harder) | interesting backtracking problem; compute the small numbers < 200; output all minus this value computed via backtrack... | 493 | 4.1 |

pagelayout | pagelayout | 3.2l, Backtracking (Harder) | a bit of geometry; O(2^n imes n^2 iterative bitmask will TLE; need to use recursive backtracking with pruning | 84 | 5.1 |

primes | primes | 3.2l, Backtracking (Harder) | backtrack; s: (id; num); prune if num exceeds Y; t: keeps this prime P[id] or try next prime factor; count num that is b... | 165 | 5.8 |

solitaire | solitaire | 3.2l, Backtracking (Harder) | backtrack; similar to Kattis - crackerbarrel and Kattis - peggamefortwo; but on simpler grid graph and there is no need ... | 169 | 3.4 |

firefly | firefly | 3.3a, Binary Search | sort stalactites vs stalagmites separately; brute force height; binary search the obstacles hit | 323 | 4.0 |

outofsorts | outofsorts | 3.3a, Binary Search | do O(log n) binary searches on unsorted array n times | 107 | 3.7 |

roompainting | roompainting | 3.3a, Binary Search | sort the cans at shop (can be used more than once); use lower_bound for what Joe needs at shop | 416 | 3.8 |

synchronizinglists | synchronizinglists | 3.3a, Binary Search | sort and lower_bound | 2130 | 1.5 |

carefulascent | carefulascent | 3.3b, Bisection and BSTA, E | BSTA + Physics simulation | 558 | 1.8 |

financialplanning | financialplanning | 3.3b, Bisection and BSTA, E | BSTA + observation | 108 | 3.5 |

freeweights | freeweights | 3.3b, Bisection and BSTA, E | BSTA + simulation; Mathematical observation | 356 | 4.5 |

hindex | hindex | 3.3b, Bisection and BSTA, E | BSTA + another binary search | 460 | 3.3 |

htoo | htoo | 3.3b, Bisection and BSTA, E | BSTA + simulation; use DAT | 200 | 2.4 |

monk | monk | 3.3b, Bisection and BSTA, E | BSTA + simulation; cool | 86 | 3.3 |

slalom2 | slalom2 | 3.3b, Bisection and BSTA, E | BSTA + Physics simulation; also available at UVa 11627 - Slalom | 43 | 5.4 |

smallschedule | smallschedule | 3.3b, Bisection and BSTA, E | BSTA + greedy or math | 302 | 3.1 |

speed | speed | 3.3b, Bisection and BSTA, E | LA 8043 - WorldFinals RapidCity17; BSTA + Physics; also available at UVa 01753 - Need for Speed | 955 | 3.2 |

suspensionbridges | suspensionbridges | 3.3b, Bisection and BSTA, E | BSTA + Maths; be careful of precision error | 409 | 4.6 |

svada | svada | 3.3b, Bisection and BSTA, E | BSTA + simulation; process the two types of monkeys separately | 144 | 3.5 |

a1paper | a1paper | 3.3c, Ternary Search & Others | division of A1 paper is a kind of DnC principle | 1212 | 3.9 |

cantor | cantor | 3.3c, Ternary Search & Others | ternary search; also available at UVa 11701 - Cantor | 255 | 2.7 |

ceiling | ceiling | 3.3c, Ternary Search & Others | LA 7578 - WorldFinals Phuket16; BST insertion then tree equality check; also available at UVa 01738 - Ceiling Function | 1871 | 1.9 |

euclideantsp | euclideantsp | 3.3c, Ternary Search & Others | that complex formula described in problem description is unimodal; c ranges from ≥ 0.1 to ≤ 500.0; ternary search;... | 288 | 2.3 |

goingtoseed | goingtoseed | 3.3c, Ternary Search & Others | divide to search into four regions; extension of binary/ternary search concept | 78 | 4.5 |

jewelrybox | jewelrybox | 3.3c, Ternary Search & Others | the objective function is unimodal; ternary search | 775 | 1.6 |

qanat | qanat | 3.3c, Ternary Search & Others | the low rating is misleading; this is a difficult math problem that requires (two) ternary searches; other solution exis... | 173 | 2.2 |

reconnaissance | reconnaissance | 3.3c, Ternary Search & Others | the objective function is unimodal; ternary search | 101 | 3.8 |

sretan | sretan | 3.3c, Ternary Search & Others | the pattern is like Gray code; find the pattern via Divide and Conquer | 110 | 4.1 |

sylvester | sylvester | 3.3c, Ternary Search & Others | 2D grid; DnC into 4 regions; count how many times that cell is part of the fourth quadrant | 359 | 2.2 |

tricktreat | tricktreat | 3.3c, Ternary Search & Others | ternary search; the function is unimodal | 156 | 3.9 |

zipline | zipline | 3.3c, Ternary Search & Others | min = straight line distance; max = use ternary search | 555 | 3.5 |

avoidland | avoidland | 3.4a, Greedy (Classical) | observe that number of rows with 0 pawn and rows with > 1 pawns should be the same; greedy bipartite matching | 256 | 3.4 |

classrooms | classrooms | 3.4a, Greedy (Classical) | variant of interval covering; multiple rooms | 229 | 5.9 |

color | color | 3.4a, Greedy (Classical) | sort the sock colors and greedily assign them to washing machines | 980 | 2.2 |

distributingseats | distributingseats | 3.4a, Greedy (Classical) | sort; greedy bipartite matching; assign passenger to earliest available row first | 60 | 5.8 |

fishmongers | fishmongers | 3.4a, Greedy (Classical) | sort; greedy bipartite matching | 160 | 3.6 |

froshweek2 | froshweek2 | 3.4a, Greedy (Classical) | greedy; sort first; similar to Dragon of Loowater; greedy matching | 489 | 2.3 |

grass | grass | 3.4a, Greedy (Classical) | interval covering; also available at UVa 10382 - Watering Grass | 330 | 5.3 |

inflation | inflation | 3.4a, Greedy (Classical) | sort; greedy matching | 711 | 1.8 |

intervalcover | intervalcover | 3.4a, Greedy (Classical) | classic interval covering; be very careful with floating point errors | 268 | 5.6 |

loowater | loowater | 3.4a, Greedy (Classical) | sort; greedy matching; also available at UVa 11292 - The Dragon of Loowater | 710 | 3.0 |

messages | messages | 3.4a, Greedy (Classical) | simple string matching; sort; like greedy interval covering | 134 | 5.2 |

squarepegs | squarepegs | 3.4a, Greedy (Classical) | convert square to circular; sort; greedy matching | 265 | 3.1 |

acm2 | acm2 | 3.4b, Involving Sorting, E | greedy; sorting | 790 | 2.6 |

akcija | akcija | 3.4b, Involving Sorting, E | greedy; sorting | 2658 | 2.0 |

aprizenoonecanwin | aprizenoonecanwin | 3.4b, Involving Sorting, E | greedy; sorting | 790 | 2.5 |

fallingapart | fallingapart | 3.4b, Involving Sorting, E | greedy; sorting | 1011 | 1.6 |

fridge | fridge | 3.4b, Involving Sorting, E | greedy; sorting | 429 | 3.1 |

gettowork | gettowork | 3.4b, Involving Sorting, E | greedy; sorting | 255 | 2.2 |

help | help | 3.4b, Involving Sorting, E | greedy; sorting | 60 | 7.5 |

hotsprings | hotsprings | 3.4b, Involving Sorting, E | greedy; sorting | 86 | 1.9 |

icpcteamselection | icpcteamselection | 3.4b, Involving Sorting, E | greedy; sorting | 586 | 3.0 |

minimumscalar | minimumscalar | 3.4b, Involving Sorting, E | greedy; sorting | 1202 | 2.3 |

pikemaneasy | pikemaneasy | 3.4b, Involving Sorting, E | greedy; sorting | 473 | 3.5 |

planetaris | planetaris | 3.4b, Involving Sorting, E | greedy; sorting | 143 | 2.8 |

plantingtrees | plantingtrees | 3.4b, Involving Sorting, E | greedy; sorting | 3462 | 2.0 |

redistribution | redistribution | 3.4b, Involving Sorting, E | greedy; sorting | 537 | 2.0 |

shopaholic | shopaholic | 3.4b, Involving Sorting, E | greedy; sorting | 959 | 2.4 |

standings | standings | 3.4b, Involving Sorting, E | greedy; sorting | 329 | 4.1 |

textmessaging | textmessaging | 3.4b, Involving Sorting, E | greedy; sorting | 222 | 2.9 |

woodcutting | woodcutting | 3.4b, Involving Sorting, E | greedy; sorting | 572 | 3.1 |

airconditioned | airconditioned | 3.4c, Involving Sorting, H | greedy; sorting | 1116 | 3.9 |

andrewant | andrewant | 3.4c, Involving Sorting, H | greedy; sorting | 97 | 4.9 |

birds | birds | 3.4c, Involving Sorting, H | greedy; sorting | 566 | 3.5 |

ceremony | ceremony | 3.4c, Involving Sorting, H | greedy; sorting | 849 | 4.3 |

dasort | dasort | 3.4c, Involving Sorting, H | greedy; sorting | 284 | 2.9 |

delivery | delivery | 3.4c, Involving Sorting, H | greedy; sorting | 253 | 3.3 |

fairdivision | fairdivision | 3.4c, Involving Sorting, H | greedy; sorting | 74 | 4.4 |

intergalacticbidding | intergalacticbidding | 3.4c, Involving Sorting, H | greedy; sorting | 346 | 3.4 |

keepitcool | keepitcool | 3.4c, Involving Sorting, H | greedy; sorting | 290 | 2.4 |

trip2007 | trip2007 | 3.4c, Involving Sorting, H | greedy; sorting; also available at UVa 11100 - The Trip, 2007 | 191 | 2.8 |

wffnproof | wffnproof | 3.4c, Involving Sorting, H | greedy; sorting; also available at UVa 11103 - WFF'N Proof | 117 | 2.9 |

ballotboxes | ballotboxes | 3.4d, Involving PQ | greedy; priority queue | 776 | 4.4 |

canvas | canvas | 3.4d, Involving PQ | greedy; priority queue | 214 | 3.5 |

entertainmentbox | entertainmentbox | 3.4d, Involving PQ | sort; greedy simulation; Priority Queue with update key (we can use multiset) | 274 | 6.0 |

vegetables | vegetables | 3.4d, Involving PQ | greedy; priority queue | 347 | 3.4 |

workstations | workstations | 3.4d, Involving PQ | greedy; priority queue | 1110 | 3.6 |

ants | ants | 3.4e, Non Classical, Easier | greedy; also available at UVa 10714 - Ants | 1145 | 2.5 |

applesack | applesack | 3.4e, Non Classical, Easier | greedy | 202 | 3.5 |

bank | bank | 3.4e, Non Classical, Easier | greedy | 2389 | 2.6 |

driver | driver | 3.4e, Non Classical, Easier | greedy | 198 | 3.8 |

horrorfilmnight | horrorfilmnight | 3.4e, Non Classical, Easier | greedy | 207 | 3.4 |

marblestree | marblestree | 3.4e, Non Classical, Easier | greedy; also available at UVa 10672 - Marbles on a tree | 258 | 3.0 |

pripreme | pripreme | 3.4e, Non Classical, Easier | greedy | 259 | 2.7 |

simplicity | simplicity | 3.4e, Non Classical, Easier | greedy | 694 | 2.5 |

skocimis | skocimis | 3.4e, Non Classical, Easier | greedy | 2156 | 1.6 |

teacherevaluation | teacherevaluation | 3.4e, Non Classical, Easier | greedy | 262 | 3.0 |

cardtrading | cardtrading | 3.4f, Non Classical, Harder | greedy | 38 | 5.0 |

dvds | dvds | 3.4f, Non Classical, Harder | greedy | 731 | 2.9 |

logland | logland | 3.4f, Non Classical, Harder | greedy | 47 | 5.8 |

playground | playground | 3.4f, Non Classical, Harder | greedy | 60 | 4.7 |

stockbroker | stockbroker | 3.4f, Non Classical, Harder | greedy | 578 | 3.4 |

virus | virus | 3.4f, Non Classical, Harder | greedy | 753 | 3.6 |

alicedigital | alicedigital | 3.5a, Max 1D/2D Range Sum | max 1D range sum variant; the solution is not DP; notice that m is small | 687 | 4.2 |

commercials | commercials | 3.5a, Max 1D/2D Range Sum | transform each input by -P; Kadane's algorithm | 1570 | 2.0 |

fieldtrip | fieldtrip | 3.5a, Max 1D/2D Range Sum | necessary condition: s (sum of class section sizes) must be divisible by 3; use DP 1D range sum to do select(s/3) and se... | 32 | 3.0 |

foldedmap | foldedmap | 3.5a, Max 1D/2D Range Sum | 2D range sum; brute force the position of starting tile | 49 | 4.6 |

nered | nered | 3.5a, Max 1D/2D Range Sum | 2D range sum; brute force possible rectangular submatrix and keep the one with minimum modification | 41 | 3.2 |

prozor | prozor | 3.5a, Max 1D/2D Range Sum | 2D range sum with fix range; output formatting | 558 | 1.6 |

purplerain | purplerain | 3.5a, Max 1D/2D Range Sum | max 1D range sum variant; Kadane's algorithm | 288 | 4.3 |

sellingspatulas | sellingspatulas | 3.5a, Max 1D/2D Range Sum | -8 per time slot initially; read sale data; 1D range sum; complete search | 109 | 8.0 |

shortsell | shortsell | 3.5a, Max 1D/2D Range Sum | similar to Kadane's algorithm; linear pass; prefix sum | 104 | 4.1 |

alphabet | alphabet | 3.5b, LIS | find LIS of a short string; the answer is 26-LIS_length | 666 | 3.2 |

increasingsubsequence | increasingsubsequence | 3.5b, LIS | LIS; n ≤ 200$; print lexicographically smallest solution, 99% similar to 'longincsubseq' | 352 | 4.1 |

longincsubseq | longincsubseq | 3.5b, LIS | standard O(n log k) LIS; print any solution | 579 | 5.7 |

manhattanmornings | manhattanmornings | 3.5b, LIS | utilize symmetries to simplify the problem; then run LIS variant in O(N log K) | 154 | 4.7 |

nesteddolls | nesteddolls | 3.5b, LIS | sort in one dimension; Dilworth's theorem; LIS in the other; also available at UVa 11368 - Nested Dolls | 115 | 7.1 |

trainsorting | trainsorting | 3.5b, LIS | max(LIS(i)+LDS(i)-1), âˆ€i âˆˆ [0...n-1]; also available at UVa 11456 | 522 | 5.4 |

knapsack | knapsack | 3.5c, 0-1 KNAPSACK | basic DP KNAPSACK; print the solution | 687 | 4.8 |

muzicari | muzicari | 3.5c, 0-1 KNAPSACK | set Knapsack of size = T, each break length as item weight, and value = 1/2 (put that break at 'virtual knapsack 1/2', r... | 343 | 4.9 |

ninepacks | ninepacks | 3.5c, 0-1 KNAPSACK | brute force all possible sums; use DP SUBSET-SUM on each hotdog and bun packs; clever problem | 499 | 4.4 |

orders | orders | 3.5c, 0-1 KNAPSACK | interesting KNAPSACK variant; print the solution | 713 | 4.5 |

presidentialelections | presidentialelections | 3.5c, 0-1 KNAPSACK | pre-process the input to discard non winnable states; be careful of negative total voters; then standard DP KNAPSACK | 116 | 5.7 |

bagoftiles | bagoftiles | 3.5d, COIN-CHANGE | count number of ways to do COIN-CHANGE; meet in the middle; DP combinatorics (n choose k) to find the answer for a+b | 102 | 6.5 |

canonical | canonical | 3.5d, COIN-CHANGE | complete search possible range of counter examples; do both greedy COIN-CHANGE and DP COIN-CHANGE | 502 | 5.7 |

exactchange2 | exactchange2 | 3.5d, COIN-CHANGE | a variation to the Coin-Change problem; also available at UVa 11517 - Exact Change | 708 | 5.4 |

beepers | beepers | 3.5e, TSP | DP or recursive backtracking with sufficient pruning; also available at UVa 10496 - Collecting Beepers | 196 | 4.6 |

bustour | bustour | 3.5e, TSP | LA 6028 - WorldFinals Warsaw12; DP TSP variant; also available at UVa 01281 - Bus Tour | 124 | 6.1 |

cycleseasy | cycleseasy | 3.5e, TSP | Count number of HAMILTONIAN-TOURs | 108 | 4.1 |

errands | errands | 3.5e, TSP | map location names to integer indices; DP TSP | 51 | 7.0 |

maximizingyourpay | maximizingyourpay | 3.5e, TSP | Max-Traveling-Salesman-Problem; can go back to vertex 0 early; use DP bitmask | 60 | 6.4 |

pokemongogo | pokemongogo | 3.5e, TSP | DP TSP variant; there can be more than one Pokemon in the same location | 154 | 5.0 |

race | race | 3.5e, TSP | try all possible subset of locations; run DP TSP variant from start to ending to see if the plan is doable; keep the bes... | 65 | 7.5 |

keyboardconcert | keyboardconcert | 3.5f, DP level 1 | s: (pos, cur); at tune[pos], playing instrument cur; t: try staying or switch; better solution exists | 100 | 4.5 |

nikola | nikola | 3.5f, DP level 1 | s: (pos, last_jump); t: jump forward or backward | 295 | 3.6 |

permutationdescent | permutationdescent | 3.5f, DP level 1 | derive the required formula; use memoization | 291 | 1.8 |

spiderman | spiderman | 3.5f, DP level 1 | simple DP; go up or down; print solution | 1010 | 3.9 |

ticketpricing | ticketpricing | 3.5f, DP level 1 | LA 6867 - Rocky Mountain15; similar with UVa 11450 discussed in this book; real life problem; print (the first) part of ... | 138 | 4.9 |

weightofwords | weightofwords | 3.5f, DP level 1 | s: (cur_l, cur_w); t: try all 26 characters; print any solution | 286 | 2.6 |

wordclouds | wordclouds | 3.5f, DP level 1 | s: (i); t: try breaking to next row at subsequent j = [i..N]; O(N^2) DP | 104 | 5.0 |

debugging | debugging | 3.5g, DP level 2 | s: (n); t: divide the program into [2..n] blocks | 226 | 6.0 |

drivinglanes | drivinglanes | 3.5g, DP level 2 | s: (st, ln); t: try all other lanes; be careful of corner cases | 105 | 3.7 |

kutevi | kutevi | 3.5g, DP level 2 | s: (360 integer degrees) | 170 | 2.6 |

tight | tight | 3.5g, DP level 2 | s: (i, j); #tight words of length i that end in digit j divided by #words: (k+1)^n; also available at UVa 10081 - Tight ... | 100 | 3.5 |

walrusweights | walrusweights | 3.5g, DP level 2 | backtracking with memoization | 570 | 3.8 |

watersheds | watersheds | 3.5g, DP level 2 | DP on an implicit DAG | 41 | 3.2 |

cartrouble | cartrouble | 4.2a, Finding CCs | graph traversal on forward and reverse graphs | 106 | 4.4 |

daceydice | daceydice | 4.2a, Finding CCs | reachability test of a state-space graph; s: (r, c, where_is_five) | 171 | 3.5 |

dominoes2 | dominoes2 | 4.2a, Finding CCs | unlike UVa 11504, we treat SCCs as CCs; also available at UVa 11518 - Dominos 2 | 599 | 3.3 |

moneymatters | moneymatters | 4.2a, Finding CCs | see if the sum of vertex weights of each CC = 0 | 990 | 3.1 |

pearwise | pearwise | 4.2a, Finding CCs | clever problem wording; can be reduced into basic graph traversal | 159 | 3.7 |

reachableroads | reachableroads | 4.2a, Finding CCs | report number of CC-1 | 892 | 2.1 |

securitybadge | securitybadge | 4.2a, Finding CCs | reachability test; clever idea to compress ids | 87 | 6.6 |

terraces | terraces | 4.2a, Finding CCs | group cells with similar height together; if it cannot flow to any other component with lower height, add the size of th... | 339 | 3.6 |

wheresmyinternet | wheresmyinternet | 4.2a, Finding CCs | check connectivity to vertex 1 | 1716 | 3.7 |

amoebas | amoebas | 4.2b, Flood Fill, Easier | easy floodfill | 1079 | 1.8 |

countingstars | countingstars | 4.2b, Flood Fill, Easier | basic flood fill problem; count CCs | 1494 | 2.7 |

floodit | floodit | 4.2b, Flood Fill, Easier | multiple calls of flood fill tests | 74 | 2.9 |

fontan | fontan | 4.2b, Flood Fill, Easier | modified multi-sources BFS/floodfill | 101 | 2.2 |

gold | gold | 4.2b, Flood Fill, Easier | flood fill with extra blocking constraint; also available at UVa 11561 - Getting Gold | 735 | 2.2 |

10kindsofpeople | 10kindsofpeople | 4.2c, Flood Fill, Harder | intelligent flood fill; just run once to avoid TLE as there are many queries | 2380 | 3.9 |

coast | coast | 4.2c, Flood Fill, Harder | intelligent flood fill; just run once to avoid TLE as there are many queries | 1339 | 3.2 |

island | island | 4.2c, Flood Fill, Harder | super tedious flood fill; involving one directional flood fill involving bridges 'B's; bridges may connect islands in cy... | 113 | 6.2 |

islands3 | islands3 | 4.2c, Flood Fill, Harder | optimistic flood fill; assume all Cs are Ls | 936 | 2.1 |

vindiagrams | vindiagrams | 4.2c, Flood Fill, Harder | challenging and tedious flood fill problem | 76 | 5.3 |

brexit | brexit | 4.2d, Topological Sort | toposort; chain reaction; modified Kahn's algorithm | 826 | 3.6 |

brexitnegotiations | brexitnegotiations | 4.2d, Topological Sort | toposort with modified Kahn's algorithm; greedy | 270 | 4.8 |

builddeps | builddeps | 4.2d, Topological Sort | the graph is acyclic; toposort with DFS from the changed file | 626 | 4.7 |

collapse | collapse | 4.2d, Topological Sort | similar with Kattis - brexit | 77 | 5.8 |

conservation | conservation | 4.2d, Topological Sort | modified Kahn's algorithm; greedily process all steps in a certain lab before alternating to the other lab | 133 | 4.2 |

curveknights | curveknights | 4.2d, Topological Sort | input is a DAG; multi-sources, find toposort; propagate using topological order | 46 | 3.3 |

digicomp2 | digicomp2 | 4.2d, Topological Sort | toposort helps avoid TLE; do not simulate the process n times as n can be as big as 10^18 | 288 | 5.9 |

grapevine | grapevine | 4.2d, Topological Sort | BFS variant; like Kahn's algorithm, only propagate from a person once his/her skepticism level is cleared; be careful wi... | 84 | 6.4 |

managingpackaging | managingpackaging | 4.2d, Topological Sort | if the graph is cyclic, output 'cannot be ordered'; otherwise, find the lexicographically smallest topological order | 128 | 5.9 |

pickupsticks | pickupsticks | 4.2d, Topological Sort | cycle check + toposort if DAG; also available at item UVa 11686 - Pick up sticks | 373 | 4.7 |

amanda | amanda | 4.2e, Graph Properties Check | add edge only among airports where only one end point has lounge; bicolouring/bipartite check; pick colour with smaller ... | 368 | 5.2 |

ballsandneedles | ballsandneedles | 4.2e, Graph Properties Check | cycle check on 2 similar graphs; easier solution exists | 161 | 3.2 |

breakingbad | breakingbad | 4.2e, Graph Properties Check | check if we can decompose the vertices into two disjoint sets; bipartite graph check | 643 | 4.2 |

hoppers | hoppers | 4.2e, Graph Properties Check | the answer is number of CC-1 if there is at least one non-bipartite component in the graph; or number of CC otherwise | 234 | 3.9 |

molekule | molekule | 4.2e, Graph Properties Check | undirected tree is also Bipartite/bi-colorable; bi-color it with 0 and 1; direct all edges from 0 to 1 (or vice versa) | 175 | 3.5 |

pubs | pubs | 4.2e, Graph Properties Check | isolated vertex has no solution; this is actually not a bipartite graph check; we can do alternate labeling of vertices ... | 216 | 3.5 |

runningmom | runningmom | 4.2e, Graph Properties Check | find a cycle in a directed graph | 591 | 3.8 |

torn2pieces | torn2pieces | 4.2e, Graph Properties Check | construct graph from strings; traversal from source to target; reachability check; print path | 1115 | 3.6 |

birthday | birthday | 4.2f, Cut Vertices/Bridges | check if the input graph contains any bridge; N is small though so weaker solution can still be accepted | 323 | 4.3 |

caveexploration | caveexploration | 4.2f, Cut Vertices/Bridges | find size of bi-connected components that contains vertex 0; identify the bridges | 306 | 3.4 |

intercept | intercept | 4.2f, Cut Vertices/Bridges | Articulation Points in SSSP Spanning DAG; clever modification of Dijkstra's | 112 | 6.6 |

kingpinescape | kingpinescape | 4.2f, Cut Vertices/Bridges | DFS from headquarter (may also be a leaf); find all L leaves; add ceil(L/2.0) edges to connect 2 leaves (correctly) to p... | 54 | 6.5 |

cantinaofbabel | cantinaofbabel | 4.2g, Finding SCCs | build directed graph 'can_speak'; compute the largest SCC of 'can_speak'; keep this largest SCC | 379 | 3.5 |

dominos | dominos | 4.2g, Finding SCCs | count the number of SCCs without incoming edge from a vertex outside that SCC; also available at UVa 11504 - Dominos | 248 | 6.2 |

equivalences | equivalences | 4.2g, Finding SCCs | contract input directed graph into SCCs; count SCCs that have in-/out-degrees = 0; report the max | 281 | 5.4 |

loopycabdrivers | loopycabdrivers | 4.2g, Finding SCCs | print all SCCs that have size ≥ 2; tricky output ordering | 55 | 5.5 |

reversingroads | reversingroads | 4.2g, Finding SCCs | small graph; if #SCC = 1, print 'valid'; otherwise try reversing one of the m directed edges one by one until we either ... | 274 | 4.4 |

test2 | test2 | 4.2g, Finding SCCs | SCC + printing solution; also available at UVa 10731 - Test | 20 | 5.5 |

droppingdirections | droppingdirections | 4.2h, Really Ad Hoc | modified graph: a vertex is (origin intersection id, intersection id); modified DFS from vertices leading to goal; count... | 87 | 3.5 |

faultyrobot | faultyrobot | 4.2h, Really Ad Hoc | interesting graph traversal variant | 182 | 4.5 |

promotions | promotions | 4.2h, Really Ad Hoc | modified DFS; special graph; DAG; also available at UVa 13015 - Promotions | 129 | 5.5 |

silueta | silueta | 4.2h, Really Ad Hoc | 2D grid processing initially; modified DFS to count perimeter of polygon in grid | 37 | 5.3 |

succession | succession | 4.2h, Really Ad Hoc | (upwards) traversal of family DAG; use unordered_maps; make the founder has very large starting blood to avoid fraction | 165 | 3.1 |

cats | cats | 4.3a, MST, Standard | standard MST | 456 | 4.1 |

communicationssatellite | communicationssatellite | 4.3a, MST, Standard | standard MST; complete graph with n ≤ 2 000 | 227 | 3.5 |

drivingrange | drivingrange | 4.3a, MST, Standard | find weight of the last edge added to MST by Kruskal's; also available at UVa 11857 - Driving Range | 336 | 3.5 |

freckles | freckles | 4.3a, MST, Standard | straightforward MST problem; also available at UVa 10034 - Freckles | 412 | 4.6 |

islandhopping | islandhopping | 4.3a, MST, Standard | MST on small complete graph | 440 | 3.0 |

jurassicjigsaw | jurassicjigsaw | 4.3a, MST, Standard | just a reading comprehension problem; afterwards it is just a basic MST problem | 110 | 2.2 |

lostmap | lostmap | 4.3a, MST, Standard | actually just a standard MST problem | 782 | 2.1 |

minspantree | minspantree | 4.3a, MST, Standard | very standard MST problem; check if a spanning tree is formed; also output the edges in any spanning tree in lexicograph... | 862 | 4.0 |

arcticnetwork | arcticnetwork | 4.3b, MST, Variants | minimum spanning 'forest'; also available at UVa 10369 - Arctic Networks | 435 | 4.4 |

firetrucksarered | firetrucksarered | 4.3b, MST, Variants | output any spanning tree that connects n people | 162 | 3.4 |

landline | landline | 4.3b, MST, Variants | MST with special leaf vertices; get (M)ST of secure buildings; connect unsecure buildings (new leaf) to (M)ST of secure ... | 168 | 5.7 |

millionairemadness | millionairemadness | 4.3b, MST, Variants | MiniMax path problem | 649 | 2.4 |

muddyhike | muddyhike | 4.3b, MST, Variants | MiniMax path problem | 209 | 3.9 |

naturereserve | naturereserve | 4.3b, MST, Variants | Prim's algorithm from multiple sources | 180 | 4.6 |

treehouses | treehouses | 4.3b, MST, Variants | 'minimum' spanning subgraph; very similar to UVa 10397 | 185 | 4.2 |

buttonbashing | buttonbashing | 4.4a, SSSP, BFS, Easier | very similar to UVa 12160 | 728 | 3.4 |

elevatortrouble | elevatortrouble | 4.4a, SSSP, BFS, Easier | s: (cur_level); only 1M floors; go up/down; BFS | 362 | 3.1 |

grid | grid | 4.4a, SSSP, BFS, Easier | modified BFS with step size multiplier | 1026 | 2.8 |

horror | horror | 4.4a, SSSP, BFS, Easier | SSSP from all sources = horror movies; report lowest ID with the highest unweighted SSSP distance | 500 | 3.3 |

spiral | spiral | 4.4a, SSSP, BFS, Easier | generate the 2D 100x100 spiraling grid first; involving small primes; BFS | 148 | 3.5 |

wettiles | wettiles | 4.4a, SSSP, BFS, Easier | multi-sources BFS; limited flood fill or unweighted SSSP limited to step T | 227 | 3.6 |

beehives2 | beehives2 | 4.4b, SSSP, BFS, Harder | find the girth (length of shortest cycle) of input graph; multiple calls of BFS | 98 | 4.4 |

bryr | bryr | 4.4b, SSSP, BFS, Harder | 0/1-weighted SSSP; solvable with BFS and deque; 0-weight for single-lane bridge, 1-weight for double-lane bridge | 70 | 2.5 |

conquestcampaign | conquestcampaign | 4.4b, SSSP, BFS, Harder | multi-sources BFS | 353 | 1.9 |

dungeon | dungeon | 4.4b, SSSP, BFS, Harder | 3D BFS; also available at UVa 00532 - Dungeon Master | 288 | 3.6 |

erdosnumbers | erdosnumbers | 4.4b, SSSP, BFS, Harder | use unordered_map as Adjacency List of author names; BFS from 'PAUL_ERDOS' | 159 | 4.4 |

erraticants | erraticants | 4.4b, SSSP, BFS, Harder | simulate; move twice per single move to differentiate the path; revisit the path using BFS | 340 | 5.1 |

escapewallmaria | escapewallmaria | 4.4b, SSSP, BFS, Harder | BFS on grid graph; generate edges dynamically according to the rules | 32 | 2.7 |

fire2 | fire2 | 4.4b, SSSP, BFS, Harder | very similar to UVa 11624 | 395 | 4.2 |

fire3 | fire3 | 4.4b, SSSP, BFS, Harder | multi-sources BFS; also available at UVa 11624 - Fire! | 289 | 5.4 |

landlocked | landlocked | 4.4b, SSSP, BFS, Harder | 0/1-weighted SSSP; 0-weight for same country; 1-weight for different country; multi-sources; BFS+deque; 8 directions | 42 | 4.6 |

lava | lava | 4.4b, SSSP, BFS, Harder | BFS; interesting output; very real life situation | 79 | 4.5 |

lost | lost | 4.4b, SSSP, BFS, Harder | interesting twist of BFS/SSSP spanning tree | 168 | 4.1 |

mallmania | mallmania | 4.4b, SSSP, BFS, Harder | multi-sources BFS from m1; get minimum at border of m2; also available at UVa 11101 - Mall Mania | 48 | 4.9 |

oceancurrents | oceancurrents | 4.4b, SSSP, BFS, Harder | 0/1-weighted SSSP; BFS+deque; also available at UVa 11573 - Ocean Currents | 118 | 5.4 |

showroom | showroom | 4.4b, SSSP, BFS, Harder | 0/1-weighted SSSP; solvable with BFS and deque; 0-weight for passing a door, 1-weight for passing a car | 256 | 4.4 |

sixdegrees | sixdegrees | 4.4b, SSSP, BFS, Harder | map strings to integers; BFS from all sources; prune at depth 6; compare size of unreachable vertices with the size of a... | 83 | 5.3 |

slikar | slikar | 4.4b, SSSP, BFS, Harder | very similar to Kattis - fire2 and UVa 11624 | 204 | 3.4 |

zoning | zoning | 4.4b, SSSP, BFS, Harder | multi-sources BFS | 140 | 4.5 |

grasshopper | grasshopper | 4.4c, Knight Moves | BFS on implicit Knight jump graph | 136 | 4.0 |

hidingplaces | hidingplaces | 4.4c, Knight Moves | SSSP from (r, c); find cells with max distance; print | 607 | 1.9 |

knightjump | knightjump | 4.4c, Knight Moves | unweighted SSSP from the cell that contains 'K' to (1, 1) using Knight jump movements; avoid '#' cells | 292 | 2.5 |

flowerytrails | flowerytrails | 4.4d, SSSP, Dijkstra, Easier | Dijkstra's; record predecessor graph as there can be multiple shortest paths; also available at UVa 12878 - Flowery Trai... | 305 | 3.9 |

george | george | 4.4d, SSSP, Dijkstra, Easier | not easy, rating deceptive: Dijkstra's but with a few constraints; some roads are blocked at certain timings; similar wi... | 205 | 2.0 |

getshorty | getshorty | 4.4d, SSSP, Dijkstra, Easier | log(f) when f in [0..1] is negative; log(f1 * f2 * ... * fn) = log(f1) + log(f2) + ... + log(fn); longest path; use max... | 1572 | 3.4 |

hopscotch50 | hopscotch50 | 4.4d, SSSP, Dijkstra, Easier | MSSP from all 1s; implicit weighted graph; stop at first cell with value k | 200 | 2.3 |

shortestpath1 | shortestpath1 | 4.4d, SSSP, Dijkstra, Easier | very standard Dijkstra's problem | 1470 | 3.5 |

shortestpath2 | shortestpath2 | 4.4d, SSSP, Dijkstra, Easier | Dijkstra's with modification; edges only available periodically; be careful with P = 0 case | 423 | 3.9 |

subway2 | subway2 | 4.4d, SSSP, Dijkstra, Easier | use basic geometry skill to build the weighted graph; then run Dijkstra's; also available at UVa 10389 - Subway | 70 | 5.9 |

texassummers | texassummers | 4.4d, SSSP, Dijkstra, Easier | Dijkstra's; complete weighted graph; print path | 97 | 4.0 |

blockcrusher | blockcrusher | 4.4e, SSSP, Dijkstra, Harder | Dijkstra's from top row to bottom row (or vice versa); print path | 257 | 5.1 |

detour | detour | 4.4e, SSSP, Dijkstra, Harder | SSSP from destination/Amsterdam; from all vertices, block outgoing edge that is part of the shortest paths to destinatio... | 167 | 4.0 |

emptyingbaltic | emptyingbaltic | 4.4e, SSSP, Dijkstra, Harder | Dijkstra's variant; grow spanning tree from drain/source | 287 | 5.4 |

firestation | firestation | 4.4e, SSSP, Dijkstra, Harder | Dijkstra's from fire stations to all intersections; need pruning to pass the time limit; also available at UVa 10278 - F... | 67 | 6.5 |

forestfruits | forestfruits | 4.4e, SSSP, Dijkstra, Harder | Dijkstra's from clearing 1; sort clearings with fruits by increasing distances; find the required formula; be careful of... | 103 | 4.1 |

fulltank | fulltank | 4.4e, SSSP, Dijkstra, Harder | model the graph carefully; state: (location, fuel), source s = (s, 0), sink t = (e, any), only enqueue fuel+1; also avai... | 192 | 4.8 |

gruesomecave | gruesomecave | 4.4e, SSSP, Dijkstra, Harder | need to understand the meaning of 'risk' of an empty cell; SSSP from E to D using least risky path; Dijkstra's | 87 | 3.6 |

invasion | invasion | 4.4e, SSSP, Dijkstra, Harder | SSSP with multiple and successive sources; multiple calls of Dijkstra's (gets lighter each time if pruned properly) | 46 | 4.3 |

passingsecrets | passingsecrets | 4.4e, SSSP, Dijkstra, Harder | harder form of Dijkstra's; print path | 36 | 4.9 |

shoppingmalls | shoppingmalls | 4.4e, SSSP, Dijkstra, Harder | special graph construction; multiple queries; Dijkstra's and print path | 79 | 4.5 |

tide | tide | 4.4e, SSSP, Dijkstra, Harder | SSSP with complex rules; 3 different weights (0, 1, or 10 seconds); Dijkstra's | 21 | 5.4 |

visualgo | visualgo | 4.4e, SSSP, Dijkstra, Harder | Dijkstra's produces SSSP spanning DAG if there are multiple shortest paths from s to t; counting paths on DAG | 496 | 3.4 |

crosscountry | crosscountry | 4.4f, SSSP, -ve weight | medium complete graph with N ≤ 1000; Bellman-Ford can still pass (or use Dijkstra's) | 217 | 3.0 |

hauntedgraveyard | hauntedgraveyard | 4.4f, SSSP, -ve weight | Bellman-Ford; negative cycle check needed | 95 | 8.2 |

shortestpath3 | shortestpath3 | 4.4f, SSSP, -ve weight | Bellman-Ford; do DFS/BFS from vertices that are part of any negative cycle | 524 | 5.1 |

xyzzy | xyzzy | 4.4f, SSSP, -ve weight | check 'positive' cycle; check connectedness; also available at UVa 10557 | 152 | 6.7 |

allpairspath | allpairspath | 4.5a, APSP, Standard | basic Floyd-Warshall; tricky negative cycle checks | 772 | 5.5 |

importspaghetti | importspaghetti | 4.5a, APSP, Standard | smallest cycle; print path by breaking the self-loop into i - other vertex j - i | 292 | 5.1 |

slowleak | slowleak | 4.5a, APSP, Standard | APSP; FW twice | 279 | 5.6 |

transportationplanning | transportationplanning | 4.5a, APSP, Standard | APSP; FW; for each unused edge, use it and see how much distance is reduced; get minimum; O(n^4) | 65 | 3.9 |

arbitrage | arbitrage | 4.5b, APSP, Variants | arbitrage problem; similar to UVa 00104 and 00436 | 324 | 3.3 |

assembly | assembly | 4.5b, APSP, Variants | we can model the problem as a small connectivity graph; use Warshall's transitive closure algorithm to check if there is... | 305 | 3.9 |

isahasa | isahasa | 4.5b, APSP, Variants | map strings to integers; the real n is ≤ 500; Warshall's transitive closure algorithm 2x; first on 'is' relationships... | 171 | 7.2 |

kastenlauf | kastenlauf | 4.5b, APSP, Variants | n ≤ 100; Warshall's transitive closure problem | 713 | 3.8 |

secretchamber | secretchamber | 4.5b, APSP, Variants | LA 8047 - WorldFinals RapidCity17; Warshall's transitive closure; also available at UVa 01757 - Secret Chamber ... | 1187 | 2.2 |

baas | baas | 4.6a, S/Longest Paths on DAG | try all possible vertex to be 'optimized'; LONGEST-PATH on DAG | 55 | 4.5 |

excavatorexpedition | excavatorexpedition | 4.6a, S/Longest Paths on DAG | s: (pos); t: try all directed edge; +1/-1 weight; LONGEST-PATH on DAG problem; be careful of negative final answer | 70 | 5.4 |

fibtour | fibtour | 4.6a, S/Longest Paths on DAG | only ~90 Fibonacci numbers not more than 10^18; LONGEST-PATH on DAG problem; special case for first two Fibonacci number... | 105 | 6.4 |

monopoly | monopoly | 4.6a, S/Longest Paths on DAG | K, b, r are all irrelevant; vertex value is either +ve (salary) or -ve (tax); LONGEST-PATH on DAG (u < v); exclude so... | 69 | 3.0 |

mravi | mravi | 4.6a, S/Longest Paths on DAG | reverse edge directions to change the input tree into a DAG; find longest path from leaf that contains ant to root | 197 | 2.7 |

safepassage | safepassage | 4.6a, S/Longest Paths on DAG | SSSP; implicit DAG; s: (cloak_pos, bitmask); try all ways to go back and forth between gate and dorm; report minimum | 387 | 4.9 |

savinguniverse | savinguniverse | 4.6a, S/Longest Paths on DAG | s: (cur_SE; Q_pos); t: stay in this search engine or switch to one other; unweighted SSSP on DAG | 122 | 4.7 |

compositions | compositions | 4.6b, Counting Paths, Easier | LA 7365 - Greater NY15; s: (N_left); t: try all values, skip some numbers | 160 | 2.3 |

helpfulcurrents | helpfulcurrents | 4.6b, Counting Paths, Easier | problem description ensures a DAG; counting path modulo 1000003; output "begin repairs" if Lysias's castle is unreachabl... | 51 | 5.3 |

marypartitions | marypartitions | 4.6b, Counting Paths, Easier | 3 ≤ m, so we will only use a few power values; counting paths on DAG | 245 | 3.5 |

robotsonagrid | robotsonagrid | 4.6b, Counting Paths, Easier | counting paths in grid (implicit DAG); DP | 147 | 4.3 |

runningsteps | runningsteps | 4.6b, Counting Paths, Easier | LA 7360 - Greater NY15; s: (leg, l2, r2, l1, r1); t: left/right leg 1/2 steps; use unordered_map as memo table; use prun... | 168 | 2.6 |

scenes | scenes | 4.6b, Counting Paths, Easier | s: (pos, ribbon_left); t: try all possible heights; ignore the flat scenes first and subtract those cases at the end | 407 | 3.6 |

cardmagic | cardmagic | 4.6c, Conversion to DAG | s: (deck, tgt_left); t: val 1 to K ≤ tgt_left | 133 | 3.9 |

drinkresponsibly | drinkresponsibly | 4.6c, Conversion to DAG | s: (cur_drink, money_left, u_left); be careful with precision errors; print solution | 98 | 4.2 |

maximizingwinnings | maximizingwinnings | 4.6c, Conversion to DAG | separate the maximizing and minimizing problem; s: (cur_room, turns_left); t: go to other room or stay | 193 | 3.9 |

quantumsuperposition | quantumsuperposition | 4.6c, Conversion to DAG | s: (id, u, step); id is either DAG 1 or DAG 2, u is current vertex, step is the number of step used; t: try all neighbor... | 172 | 6.0 |

shortestpath4 | shortestpath4 | 4.6c, Conversion to DAG | s: (u, vtx_left); t: neighbors of u | 76 | 3.0 |

adjoin | adjoin | 4.6d, Tree | the key parts are finding tree diameter and its center (along that diameter); also see UVa 11695 | 373 | 5.3 |

appealtotheaudience | appealtotheaudience | 4.6d, Tree | LONGEST-PATH on tree + greedy matching (strongest player plays the most and so on) | 31 | 3.1 |

decisions | decisions | 4.6d, Tree | collapse a sub-tree into a super vertex if all f values on its leaves are equal; count size of min BDD tree recursively | 151 | 3.1 |

flight | flight | 4.6d, Tree | cut the worst edge along the tree diameter; link two centers; also available at UVa 11695 - Flight Planning | 46 | 6.3 |

frozenrose | frozenrose | 4.6d, Tree | tree traversal; is it better to close the valve that goes in to a vertex u or close subset of valve(s) in subtree of u | 56 | 3.5 |

kitten | kitten | 4.6d, Tree | simple rooted tree traversal; from a vertex back to root | 1278 | 1.7 |

mazemakers | mazemakers | 4.6d, Tree | long problem statement to describe a custom 2D grid graph; just a graph traversal: check if all cells are visited and th... | 171 | 2.8 |

tourists | tourists | 4.6d, Tree | APSP on Tree (special requirements); LCA | 431 | 3.8 |

whostheboss | whostheboss | 4.6d, Tree | sort; create the tree graph; DFS from root; parent array and size of subtree (a bit of DP) | 29 | 6.1 |

absurdistan3 | absurdistan3 | 4.6e, Bipartite Graph | can be modeled as MCBM; or greedy graph construction with PQ | 312 | 5.6 |

bookclub | bookclub | 4.6e, Bipartite Graph | check if perfect MCBM is possible | 307 | 4.5 |

elementarymath | elementarymath | 4.6e, Bipartite Graph | left set: (a, b); right set: possible scores; possible if MCBM = n; use long long | 365 | 5.1 |

escapeplan | escapeplan | 4.6e, Bipartite Graph | left set: robots; right set: holes; 3 version of similar bipartite graphs; MCBM | 98 | 5.7 |

flippingcards | flippingcards | 4.6e, Bipartite Graph | left set: n card numbers; right set: 2*n picture numbers; possible if MCBM = n; need fast algorithm | 169 | 7.0 |

gopher2 | gopher2 | 4.6e, Bipartite Graph | MCBM; also available at UVa 10080 - Gopher II | 337 | 4.3 |

paintball | paintball | 4.6e, Bipartite Graph | very similar with bookclub | 335 | 4.3 |

pianolessons | pianolessons | 4.6e, Bipartite Graph | straightforward MCBM | 151 | 4.5 |

catenyms | catenyms | 4.6f, Eulerian Graph | Euler graph property check; 26 vertices; directed non simple graph; printing the Euler tour in lexicographic order | 67 | 7.1 |

eulerianpath | eulerianpath | 4.6f, Eulerian Graph | Euler graph property check; directed graph; printing the Euler tour | 219 | 5.6 |

grandopening | grandopening | 4.6f, Eulerian Graph | false alarm case is trivial; model the movement as a directed graph; check if Eulerian path exists | 89 | 5.9 |

railroad2 | railroad2 | 4.6f, Eulerian Graph | x-shaped level junctions have even degrees - ignore X; y-shaped switches have degree 3 - Y has to be even | 2188 | 1.4 |

alloys | alloys | 5.2a, Finding Formula, Easier | easy formula; be careful when c < 1.0 | 202 | 3.8 |

averageseasy | averageseasy | 5.2a, Finding Formula, Easier | find O(n) formula; also see Kattis - averageshard | 758 | 2.4 |

averageshard | averageshard | 5.2a, Finding Formula, Easier | find O(n) formula; also see Kattis - averageseasy | 605 | 2.6 |

bishops | bishops | 5.2a, Finding Formula, Easier | chess pattern involving bishops; from IPSC 2004 | 1185 | 2.2 |

chanukah | chanukah | 5.2a, Finding Formula, Easier | simple formula involving sum of arithmetic progression | 1064 | 1.5 |

crne | crne | 5.2a, Finding Formula, Easier | simulate cutting process on small numbers; get formula | 477 | 2.5 |

electricaloutlets | electricaloutlets | 5.2a, Finding Formula, Easier | there is a one liner formula for this problem; don't overthink it | 179 | 1.3 |

limbo1 | limbo1 | 5.2a, Finding Formula, Easier | if we go L only, we have 1,2,4,7,11,16; then add R | 127 | 3.5 |

malfunctioningrobot | malfunctioningrobot | 5.2a, Finding Formula, Easier | Manhattan Distance with zig zag pattern; special case (-1) for different dx/dy parities | 103 | 2.2 |

pauleigon | pauleigon | 5.2a, Finding Formula, Easier | easy to derive | 1614 | 1.8 |

sequentialmanufacturing | sequentialmanufacturing | 5.2a, Finding Formula, Easier | we can control the input; the answer involves max element | 51 | 2.9 |

soylent | soylent | 5.2a, Finding Formula, Easier | ceiling function | 3008 | 1.7 |

sumkindofproblem | sumkindofproblem | 5.2a, Finding Formula, Easier | sum of arithmetic progression | 3258 | 1.7 |

twostones | twostones | 5.2a, Finding Formula, Easier | just check odd or even | 15317 | 1.3 |

appallingarchitecture | appallingarchitecture | 5.2b, Finding Formula, Harder | get formula of center of gravity; involving averages | 139 | 4.0 |

beautifulprimes | beautifulprimes | 5.2b, Finding Formula, Harder | use all 2s first; use 11 to increase digits | 171 | 4.1 |

dickandjane | dickandjane | 5.2b, Finding Formula, Harder | need some mathematical insights; also available at UVa 10257 - Dick and Jane | 87 | 5.8 |

doorman | doorman | 5.2b, Finding Formula, Harder | find the required formula | 1116 | 2.3 |

eatingout | eatingout | 5.2b, Finding Formula, Harder | there is a one liner formula for this problem | 480 | 3.1 |

limbo2 | limbo2 | 5.2b, Finding Formula, Harder | the expansion alternates right/down; filling order alternates down/right; size doubles each time | 44 | 3.5 |

loorolls | loorolls | 5.2b, Finding Formula, Harder | Nick replaces his regular roll immediately; but he does NOT do that immediately with his backup rolls k = 2, 3, ... | 258 | 1.9 |

mortgage | mortgage | 5.2b, Finding Formula, Harder | geometric progression; divergent but finite; special case when r = 1.0 (no interest) | 51 | 7.9 |

neighborhoodwatch | neighborhoodwatch | 5.2b, Finding Formula, Harder | sum of AP; inclusion-exclusion | 319 | 3.1 |

nine | nine | 5.2b, Finding Formula, Harder | find the required formula | 681 | 3.2 |

pleasegofirst | pleasegofirst | 5.2b, Finding Formula, Harder | linear pass; monitor size of group and last appearance of member of the group to compute the savings | 90 | 3.0 |

pyramidkonstruktion | pyramidkonstruktion | 5.2b, Finding Formula, Harder | sum of AP; maximize 4x2 LEGO bricks; we can merge two 2x2 LEGO bricks into one 4x2; we need one 2x2 LEGO brick for the t... | 58 | 3.1 |

rectangularspiral | rectangularspiral | 5.2b, Finding Formula, Harder | the first 3 minimal moves always 1R, 2U, 3D that will bring us to coordinate (-2, 2); case analysis | 96 | 3.3 |

sequence | sequence | 5.2b, Finding Formula, Harder | this is NOT an LIS problem; the longest possible answer is a LIS that consists of powers of twos | 310 | 3.6 |

allaboutthatbase | allaboutthatbase | 5.2c, Base Number Conversion | check base 1 to 36; base 1 is special; Big Integer | 927 | 2.9 |

arithmetic | arithmetic | 5.2c, Base Number Conversion | conversion of octal (per 4 bits) to hexa (per 3 bits); be careful with leading zeroes | 726 | 3.9 |

arithmeticdecoding | arithmeticdecoding | 5.2c, Base Number Conversion | binary to decimal; but do as asked | 46 | 3.1 |

basicremains | basicremains | 5.2c, Base Number Conversion | also involving Big Integer modulo; also available at UVa 10551 - Basic Remains | 174 | 3.4 |

oktalni | oktalni | 5.2c, Base Number Conversion | convert each 3-bits of binary strings to octal; Big Integer | 634 | 1.8 |

whichbase | whichbase | 5.2c, Base Number Conversion | try reading input in base 8/10/16 | 523 | 2.4 |

aliennumbers | aliennumbers | 5.2d, Base Number Variants | source base to decimal; decimal to target base | 1050 | 2.1 |

babylonian | babylonian | 5.2d, Base Number Variants | base 60 | 464 | 2.2 |

basic | basic | 5.2d, Base Number Variants | parsing; state processing; base number; tedious | 47 | 6.4 |

crypto | crypto | 5.2d, Base Number Variants | assert(N <= 100000000) does NOT get RTE; so brute force can actually pass... | 270 | 3.7 |

ignore | ignore | 5.2d, Base Number Variants | actually a base 7 conversion problem as only 7 digits are meaningful when rotated | 268 | 3.2 |

mixedbasearithmetic | mixedbasearithmetic | 5.2d, Base Number Variants | mix of base 10 and two versions of base 26 | 54 | 5.9 |

parsinghex | parsinghex | 5.2d, Base Number Variants | a bit of string parsing; hexadecimal to decimal | 529 | 2.9 |

sumsquareddigits | sumsquareddigits | 5.2d, Base Number Variants | base number conversion; square the digits | 1503 | 1.4 |

candlebox | candlebox | 5.2e, Number Systems/Seqs | sum of arithmetic series [1..N]; -6 for Rita or -3 for Theo; brute force Rita's age; also available at UVa 13161 - Candl... | 448 | 2.6 |

collatz | collatz | 5.2e, Number Systems/Seqs | similar to UVa 00694; just do as asked | 757 | 3.7 |

hailstone | hailstone | 5.2e, Number Systems/Seqs | similar to Kattis - collatz; just do as asked; no need to write recursive solution | 224 | 3.2 |

permutedarithmeticsequence | permutedarithmeticsequence | 5.2e, Number Systems/Seqs | sort differences of adjacent items | 1262 | 2.0 |

rationalsequence | rationalsequence | 5.2e, Number Systems/Seqs | pattern finding; tree traversal on a special tree | 458 | 4.6 |

sheldon | sheldon | 5.2e, Number Systems/Seqs | brute force; try all possibilities of Sheldon Numbers; convert binary string to ULL; put into sorted set | 129 | 4.8 |

3dprinter | 3dprinter | 5.2f, Log, Exp, Pow | ceil(log2(n))+1 | 3758 | 2.0 |

bestcompression | bestcompression | 5.2f, Log, Exp, Pow | related to power of two; use long long; also available at UVa 11556 - Best Compression Ever | 719 | 2.1 |

bus | bus | 5.2f, Log, Exp, Pow | involving powers of two | 1785 | 1.7 |

cokolada | cokolada | 5.2f, Log, Exp, Pow | the answers involve powers of two and a simulation | 605 | 2.2 |

differentdistances | differentdistances | 5.2f, Log, Exp, Pow | power | 1833 | 1.6 |

factstone | factstone | 5.2f, Log, Exp, Pow | use logarithm; power; also available at UVa 10916 - Factstone Benchmark | 200 | 3.6 |

lemonadetrade | lemonadetrade | 5.2f, Log, Exp, Pow | use logarithm transformation technique; linear pass | 82 | 5.3 |

pot | pot | 5.2f, Log, Exp, Pow | the power is always the last digit | 8562 | 1.3 |

schoolspirit | schoolspirit | 5.2f, Log, Exp, Pow | compute group score using power of 0.8 as described; simulation | 371 | 1.5 |

slatkisi | slatkisi | 5.2f, Log, Exp, Pow | power of 10; division; rounding | 331 | 2.3 |

stirlingsapproximation | stirlingsapproximation | 5.2f, Log, Exp, Pow | O(n) pass; use log transformation to help beat TLE | 157 | 4.5 |

tetration | tetration | 5.2f, Log, Exp, Pow | n to the power of 1/n | 718 | 1.6 |

thebackslashproblem | thebackslashproblem | 5.2f, Log, Exp, Pow | actually power of two | 349 | 2.2 |

triangle | triangle | 5.2f, Log, Exp, Pow | use log 10 to compute the required answer | 722 | 2.7 |

beehouseperimeter | beehouseperimeter | 5.2g, Grid | transform the hexagonal grid like Kattis - honeyheist; flood fill from outside Alice's house; count #walls touched | 155 | 4.0 |

fleaonachessboard | fleaonachessboard | 5.2g, Grid | just simulate the jumps; also available at UVa 10620 - A Flea on a Chessboard | 77 | 5.7 |

honeyheist | honeyheist | 5.2g, Grid | transform the hexagonal grid input into 2D grid first; then run SSSP on unweighted graph; BFS | 135 | 3.8 |

maptiles2 | maptiles2 | 5.2g, Grid | simple conversion between two grid indexing systems | 1338 | 1.6 |

ada | ada | 5.2h, Polynomial | polynomial problem; apply the given procedure recursively | 346 | 2.8 |

curvyblocks | curvyblocks | 5.2h, Polynomial | differentiate degree 3 to degree 2 polynomial; get roots of quadratic equation; the two blocks will touch at either root... | 89 | 4.3 |

hammingellipses | hammingellipses | 5.2h, Polynomial | reduce this problem into a series of polynomial multiplications; we can still use O(n^2) polynomial multiplication; or D... | 97 | 3.2 |

plot | plot | 5.2h, Polynomial | analyze the given pseudocode; the required pattern involves Binomial Coefficients | 210 | 2.5 |

polymul1 | polymul1 | 5.2h, Polynomial | basic polynomial multiplication problem | 646 | 2.0 |

deadfraction | deadfraction | 5.2i, Fractions | try every single possible repeating decimals; also available at UVa 10555 - Dead Fraction | 153 | 4.9 |

fraction | fraction | 5.2i, Fractions | continued fraction to normal fraction and vice versa | 154 | 3.8 |

fractionallotion | fractionallotion | 5.2i, Fractions | brute force x > n; compute y; stop when y < x | 349 | 2.9 |

jointattack | jointattack | 5.2i, Fractions | fraction; flip the fraction after each step; gcd | 182 | 2.6 |

mixedfractions | mixedfractions | 5.2i, Fractions | convert fraction to mixed fraction | 5154 | 1.5 |

rationalarithmetic | rationalarithmetic | 5.2i, Fractions | fraction; use GCD to simplify output | 661 | 3.3 |

rationalratio | rationalratio | 5.2i, Fractions | express repeating decimal as reduced fraction; use Python fractions | 216 | 5.5 |

temperatureconfusion | temperatureconfusion | 5.2i, Fractions | simple conversion; fraction; GCD | 393 | 2.1 |

thermostat | thermostat | 5.2i, Fractions | convert one temperature to another; use fraction; use Java BigInteger; gcd | 81 | 3.4 |

matrix | matrix | 5.2j, Really Ad Hoc | use simple linear algebra; one special case when c = 0 | 784 | 3.1 |

trip | trip | 5.2j, Really Ad Hoc | be careful with precision error; also available at UVa 10137 - The Trip | 103 | 5.5 |

yoda | yoda | 5.2j, Really Ad Hoc | ad hoc; 9 digits comparison | 1607 | 2.1 |

enlarginghashtables | enlarginghashtables | 5.3a, Prime Numbers | use sieve up to 40 000; prime test numbers greater than 2n; check primality of n itself | 448 | 3.4 |

primesieve | primesieve | 5.3a, Prime Numbers | use sieve up to 10^8; it is fast enough | 865 | 4.5 |

reseto | reseto | 5.3a, Prime Numbers | sieve of Eratosthenes until the k-th crossing | 460 | 2.7 |

flowergarden | flowergarden | 5.3b, (Prob) Prime Testing | Euclidean dist; small prime check; use isProbablePrime; simulation; faster solutions exist | 317 | 4.4 |

goldbach2 | goldbach2 | 5.3b, (Prob) Prime Testing | simple brute force problem; use isProbablePrime; faster solutions exist | 1219 | 2.7 |

primes2 | primes2 | 5.3b, (Prob) Prime Testing | convert input to either base 2/8/10/16; skip those that cause NumberFormatException error; use isProbablePrime test and ... | 289 | 4.7 |

pseudoprime | pseudoprime | 5.3b, (Prob) Prime Testing | yes if !isPrime(p) && a.modPow(p, p) = a; Big Integer; also available at UVa 11287 - Pseudoprime Numbers | 347 | 3.5 |

pascal | pascal | 5.3c, Finding Prime Factors | find lowest prime factor of N; special case: N = 1 | 351 | 3.8 |

primalrepresentation | primalrepresentation | 5.3c, Finding Prime Factors | factorization problem; use sieve to avoid TLE; use long long; 2^{31}-1 is a prime |
258 | 5.4 |

primereduction | primereduction | 5.3c, Finding Prime Factors | factorization problem | 465 | 3.9 |

almostperfect | almostperfect | 5.3d, Prime Factors Functions | sumDiv(N)-N; minor variation | 1507 | 3.2 |

divisors | divisors | 5.3d, Prime Factors Functions | return numDiv(nCk); but do not compute nCk directly; work with its prime factors | 208 | 5.2 |

listgame | listgame | 5.3d, Prime Factors Functions | simply return numPF(X) | 1938 | 3.1 |

relatives | relatives | 5.3d, Prime Factors Functions | EulerPhi(N); also available at UVa 10299 - Relatives | 231 | 3.8 |

data | data | 5.3e, Modified Sieve | numDiffPF(V) for V up to N x 1000; Brute force combination/all subsets; DP Subset | 68 | 5.9 |

farey | farey | 5.3e, Modified Sieve | pre-calculate EulerPhi(N); do prefix sum (1D RSQ) of EulerPhi(N) from 1 to each N; the answer is related to this value | 257 | 3.6 |

nonprimefactors | nonprimefactors | 5.3e, Modified Sieve | numDiv(i) - numDiffPF(i) ∀i in the range; the I/O files are large so Buffered I/O speed is needed | 389 | 5.6 |

dasblinkenlights | dasblinkenlights | 5.3f, GCD and/or LCM | just check if the LCM of p and q ≤ s | 1745 | 1.7 |

doodling | doodling | 5.3f, GCD and/or LCM | need to observe pattern; involving LCM/GCD | 30 | 4.9 |

jackpot | jackpot | 5.3f, GCD and/or LCM | similar to Kattis - smallestmultiple; use Java BigInteger or other faster solutions | 379 | 3.2 |

prsteni | prsteni | 5.3f, GCD and/or LCM | GCD of first circle radius with subsequent circle radiuses | 993 | 1.6 |

smallestmultiple | smallestmultiple | 5.3f, GCD and/or LCM | simple LCMs of all numbers; use Java BigInteger to be safe | 335 | 3.5 |

eulersnumber | eulersnumber | 5.3g, Factorial | simulate the computation of the approximation (involving factorial) using double data type; the answer will converge; su... | 963 | 1.9 |

howmanydigits | howmanydigits | 5.3g, Factorial | good problem; number of digits in factorial; similar as Kattis - inversefactorial | 1071 | 3.7 |

inversefactorial | inversefactorial | 5.3g, Factorial | good problem; number of digits in factorial | 1059 | 5.3 |

loworderzeros | loworderzeros | 5.3g, Factorial | last non zero digit of factorial; classic | 288 | 4.2 |

namethatpermutation | namethatpermutation | 5.3g, Factorial | permutation number; involving factorial | 154 | 4.8 |

tutorial | tutorial | 5.3g, Factorial | factorial is just part of the problem; pruning | 1249 | 2.8 |

consecutivesums | consecutivesums | 5.3h, Working with PFs | work with factor; sum of Arithmetic Progression series | 239 | 5.2 |

factovisors | factovisors | 5.3h, Working with PFs | factorize m; see if it has support in n!; Legendre's formula; also available at UVa 10139 - Factovisors | 373 | 6.4 |

fundamentalneighbors | fundamentalneighbors | 5.3h, Working with PFs | reverse prime power notation | 237 | 4.5 |

iks | iks | 5.3h, Working with PFs | sieve of Eratosthenes; prime factorize each number; spread the factors around to maximize final GCD/minimize total opera... | 115 | 3.0 |

olderbrother | olderbrother | 5.3h, Working with PFs | just check if q = p^k | 420 | 3.4 |

parket | parket | 5.3h, Working with PFs | just factorize (R+B) | 172 | 2.6 |

perfectpowers | perfectpowers | 5.3h, Working with PFs | GCD of all prime powers; note if x is negative; also available at UVa 10622 - Perfect P-th Power | 590 | 5.3 |

persistent | persistent | 5.3h, Working with PFs | similar to UVa 00993; also available at UVa 10527 - Persistent Numbers | 161 | 3.8 |

anothercandies | anothercandies | 5.3i, Modular Arithmetic | simple modular arithmetic | 1843 | 2.7 |

modulo | modulo | 5.3i, Modular Arithmetic | very simple problem | 5658 | 1.4 |

ones | ones | 5.3i, Modular Arithmetic | no factor of 2 and 5 implies that there is no trailing zero; also available at UVa 10127 - Ones | 567 | 4.6 |

threedigits | threedigits | 5.3i, Modular Arithmetic | simulate factorial computation; remove trailing zeroes; keep many last few non-zero digits using modulo | 289 | 5.9 |

vauvau | vauvau | 5.3i, Modular Arithmetic | modular arithmetic problem | 1265 | 1.8 |

candydistribution | candydistribution | 5.3j, Extended Euclid | the problem boils down to finding C^{-1} (mod K); be careful when the answer is "IMPOSSIBLE" or ≤ K |
199 | 4.9 |

jughard | jughard | 5.3j, Extended Euclid | somewhat Linear Diophantine Equation | 132 | 3.3 |

modulararithmetic | modulararithmetic | 5.3j, Extended Euclid | the division operation requires modular inverse; use Extended Euclidean algorithm | 333 | 2.9 |

soyoulikeyourfoodhot | soyoulikeyourfoodhot | 5.3j, Extended Euclid | Linear Diophantine Equation; still solvable with brute force | 103 | 5.2 |

divisible | divisible | 5.3k, Divisibility Test | divisibility; linear pass algorithm | 327 | 4.3 |

jazzitup | jazzitup | 5.3k, Divisibility Test | square free divisibility test | 59 | 2.1 |

magical3 | magical3 | 5.3k, Divisibility Test | divisibility test of n-3; a few corner cases | 348 | 6.1 |

meowfactor | meowfactor | 5.3k, Divisibility Test | divisibility test of 9^ans; small range of ans | 310 | 3.5 |

thinkingofanumber | thinkingofanumber | 5.3k, Divisibility Test | simple range; use min/max properly; then small divisibility tests | 379 | 3.8 |

anti11 | anti11 | 5.4a, Fibonacci Numbers | this problem degenerates into a modified Fibonacci numbers | 518 | 2.7 |

batmanacci | batmanacci | 5.4a, Fibonacci Numbers | Fibonacci; observation on N; Divide and Conquer | 331 | 3.8 |

rijeci | rijeci | 5.4a, Fibonacci Numbers | simple simulation with a single loop; Fibonacci | 2478 | 1.5 |

election | election | 5.4b, Binomial Coefficients | compute the answers with help of binomial coefficients | 213 | 6.2 |

insert | insert | 5.4b, Binomial Coefficients | simulation of BST insertion; then C(l+r, r) for each vertex where l/r are the sizes of the left/right subtree of that ve... | 259 | 2.0 |

lockedtreasure | lockedtreasure | 5.4b, Binomial Coefficients | the answer is ^{n}C_{m-1} |
321 | 2.8 |

oddbinom | oddbinom | 5.4b, Binomial Coefficients | OEIS A006046 | 245 | 3.5 |

perica | perica | 5.4b, Binomial Coefficients | sorting + binomial coefficient; take i-th largest element and use its binomial coefficient to get the number of times it... | 120 | 5.9 |

catalan | catalan | 5.4c, Catalan Numbers | basic Catalan Numbers | 521 | 3.6 |

catalansquare | catalansquare | 5.4c, Catalan Numbers | Catalan Numbers++; follow the description | 507 | 3.5 |

fiat | fiat | 5.4c, Catalan Numbers | N-th Catalan Number; use Fermat's little theorem | 75 | 6.7 |

character | character | 5.4d, Others, Easier | OEIS A000295 | 841 | 2.4 |

honey | honey | 5.4d, Others, Easier | OEIS A002898 | 415 | 2.4 |

integerdivision | integerdivision | 5.4d, Others, Easier | count frequencies of each remainder of [0..d-1]; add C(freq, 2) per such remainder | 242 | 3.3 |

anagramcounting | anagramcounting | 5.4e, Others, Harder | use Big Integer | 1117 | 3.1 |

incognito | incognito | 5.4e, Others, Harder | count frequencies; combinatorics; minus one | 791 | 2.7 |

kitchencombinatorics | kitchencombinatorics | 5.4e, Others, Harder | use fast data structures to help; combinatorics; intermediate result may overflow | 198 | 5.0 |

tritiling | tritiling | 5.4e, Others, Harder | there are two related recurrences here; also available at UVa 10918 - Tri Tiling | 465 | 2.1 |

bobby | bobby | 5.5a, Probability, Easier | computation of expected value | 618 | 2.8 |

deceptivedice | deceptivedice | 5.5a, Probability, Easier | DP probability; expected value | 30 | 3.0 |

dicebetting | dicebetting | 5.5a, Probability, Easier | s: (dice_left, distinct_numbers_so_far); each throw can increase distinct_numbers_so_far or not | 261 | 3.3 |

dicegame | dicegame | 5.5a, Probability, Easier | simple comparison of two expected values | 3410 | 1.5 |

odds | odds | 5.5a, Probability, Easier | complete search; simple probability | 142 | 2.5 |

orchard | orchard | 5.5a, Probability, Easier | DP probability; s: (current R, G, B, Y, S_left); t: Raven's move, fruit basket, or one up to four fruits; a bit tedious | 82 | 2.7 |

password | password | 5.5a, Probability, Easier | expected value; the given probabilities already sum to 1.0 | 980 | 2.2 |

secretsanta | secretsanta | 5.5a, Probability, Easier | simple probability; derangement vs factorial; the answer for larger N converges | 321 | 2.7 |

2naire | 2naire | 5.5b, Probability, Harder | probability; expected value | 192 | 2.7 |

anthony | anthony | 5.5b, Probability, Harder | DP probability; need to drop one parameter (N or M) and recover it from the other one | 203 | 5.2 |

bribe | bribe | 5.5b, Probability, Harder | DP probability; bitmask, need to drop one parameter (cur_money) and recover it from the bitmask | 53 | 6.3 |

genius | genius | 5.5b, Probability, Harder | generate X sequentially as asked; compute probability of X winning; bottom-up DP; sum the probability of having at least... | 51 | 2.8 |

gnollhypothesis | gnollhypothesis | 5.5b, Probability, Harder | linearity of expectation; try all possible d consecutive non-chosen monsters behind monster i (wrap around); nCk | 135 | 3.3 |

goodcoalition | goodcoalition | 5.5b, Probability, Harder | DP probability; like KNAPSACK | 276 | 3.4 |

lostinthewoods | lostinthewoods | 5.5b, Probability, Harder | simulate random walks of various lengths and distribute the probabilities per iteration; the answer will converge eventu... | 77 | 3.1 |

pollygone | pollygone | 5.5b, Probability, Harder | DP probability; bottom up; s: (probability); t: what can each opened box do to the probabilities computed so far | 94 | 5.0 |

cool1 | cool1 | 5.6a, Cycle Finding | the first part is a cycle-finding problem; state is small (8M); be careful of the definition of trail | 142 | 7.1 |

fibonaccicycles | fibonaccicycles | 5.6a, Cycle Finding | detect cycle of fib(n)%k using fast data structure | 118 | 3.2 |

happyprime | happyprime | 5.6a, Cycle Finding | simple cycle-finding; TLE otherwise; small prime check | 1151 | 2.5 |

rats | rats | 5.6a, Cycle Finding | string processing plus cycle-finding; unordered_set | 92 | 6.3 |

alexandbarb | alexandbarb | 5.7a, Game Theory (Basic) | analyze the requirements for winning states; simple solution | 179 | 3.1 |

amultiplicationgame | amultiplicationgame | 5.7a, Game Theory (Basic) | simulate the perfect play; also available at UVa 00847 - A multiplication game | 213 | 4.7 |

bachetsgame | bachetsgame | 5.7a, Game Theory (Basic) | 2 players game; Dynamic Programming; also available at UVa 10404 - Bachet's Game | 724 | 2.1 |

blockgame2 | blockgame2 | 5.7a, Game Theory (Basic) | observe the pattern; 2 winnable cases if N == M and N%M == 0; only 1 move if M < N < 2M; we can always win if N &g... | 314 | 3.2 |

breakingbranches | breakingbranches | 5.7a, Game Theory (Basic) | analyze small test cases to get the solution | 105 | 1.6 |

cuttingbrownies | cuttingbrownies | 5.7a, Game Theory (Basic) | observe the pattern; involves logarithm | 166 | 4.1 |

euclidsgame | euclidsgame | 5.7a, Game Theory (Basic) | minimax; backtracking; also available at UVa 10368 - Euclid's Game | 199 | 4.8 |

ivana | ivana | 5.7a, Game Theory (Basic) | brute force all possible first move (break cycle into a chain); DP; s: (l, r), maximize difference between two consecuti... | 55 | 5.3 |

joylessgame | joylessgame | 5.7a, Game Theory (Basic) | game theory | 384 | 4.3 |

linije | linije | 5.7a, Game Theory (Basic) | game theory; check conditions on how Mirko can win and when Slavko can win; involves MCBM | 39 | 7.9 |

peggamefortwo | peggamefortwo | 5.7a, Game Theory (Basic) | game theory; minimax; 2 alternating players; backtracking/DP on special grid; harder version of Kattis - crackerbarrel | 206 | 3.1 |

checkingforcorrectness | checkingforcorrectness | 5.8a, Matrix Power | Java Big Integer; one subtask uses modPow | 244 | 4.1 |

porpoises | porpoises | 5.8a, Matrix Power | Fibonacci; matrix power; modulo | 268 | 2.9 |

powers | powers | 5.8a, Matrix Power | when a is even, the answer is (a/2)^b, otherwise the answer is 0 | 180 | 5.4 |

squawk | squawk | 5.8a, Matrix Power | count the number of paths of length L in an undirected graph after t steps that are reachable from source s | 409 | 3.5 |

crackingthecode | crackingthecode | 6.2a, Cipher, Harder | one corner case involving the 25th to 26th character determination | 48 | 6.4 |

grille | grille | 6.2a, Cipher, Harder | involving 2D array with rotation | 361 | 3.8 |

itsasecret | itsasecret | 6.2a, Cipher, Harder | playfair cipher; 2D array; quite tedious | 81 | 5.9 |

kleptography | kleptography | 6.2a, Cipher, Harder | cipher | 701 | 1.5 |

monumentmaker | monumentmaker | 6.2a, Cipher, Harder | cipher; need a bit work; trimming tokens | 76 | 4.8 |

permutationencryption | permutationencryption | 6.2a, Cipher, Harder | be careful of newline | 1163 | 2.5 |

playfair | playfair | 6.2a, Cipher, Harder | follow the description; a bit tedious; also available at UVa 11697 - Playfair Cipher | 156 | 2.5 |

progressivescramble | progressivescramble | 6.2a, Cipher, Harder | the encode part is trivial; the decode part requires a bit of thinking | 977 | 2.1 |

textencryption | textencryption | 6.2a, Cipher, Harder | convert input alphabets to UPPERCASEs; loop | 305 | 3.2 |

ummcode | ummcode | 6.2a, Cipher, Harder | cipher; just do as asked | 144 | 3.5 |

calculator | calculator | 6.2b, Input Parsing (Rec) | recursive parser and evaluator | 351 | 3.3 |

otpor | otpor | 6.2b, Input Parsing (Rec) | parallel vs series evaluation; write a recursive parser; or use linear pass with stack | 94 | 4.3 |

polish | polish | 6.2b, Input Parsing (Rec) | recursive parser | 224 | 3.3 |

selectgroup | selectgroup | 6.2b, Input Parsing (Rec) | recursive parser; afterwards it is just set operations | 138 | 3.5 |

subexpression | subexpression | 6.2b, Input Parsing (Rec) | recursive parsing; use DP; similar to https://visualgo.net/en/recursion tree versus DAG | 44 | 5.9 |

apaxiaaans | apaxiaaans | 6.2c, Regular Expression | solvable with regex | 6751 | 1.4 |

hidden | 6.2c, Regular Expression | just a careful 1D array manipulation; we can also use regex | 2.3 | ||

lindenmayorsystem | lindenmayorsystem | 6.2c, Regular Expression | DAT; map char to string; simulation; max answer ≤ 30*5^5; we can also use regex | 302 | 2.5 |

asciifigurerotation | asciifigurerotation | 6.2d, Output Formatting, H | rotate the input 90 degrees clockwise; remove trailing whitespaces; tedious | 521 | 3.5 |

imagedecoding | imagedecoding | 6.2d, Output Formatting, H | simple Run-Length Encoding | 321 | 3.4 |

juryjeopardy | juryjeopardy | 6.2d, Output Formatting, H | tedious problem | 309 | 2.3 |

mathworksheet | mathworksheet | 6.2d, Output Formatting, H | print the width of each token appropriately | 142 | 5.5 |

nizovi | nizovi | 6.2d, Output Formatting, H | formatting with indentation; not that trivial but sample input/output helps | 199 | 3.8 |

pathtracing | pathtracing | 6.2d, Output Formatting, H | just simulate and draw the path; tedious | 675 | 3.1 |

rot | rot | 6.2d, Output Formatting, H | rotate 2D array by 90 degrees (easier) and 45 degrees (more challenging) | 107 | 2.8 |

wordsfornumbers | wordsfornumbers | 6.2d, Output Formatting, H | tedious problem; use mini program to generate [1..99]; also see Kattis - recenice that goes up to [1..999] | 604 | 2.5 |

aaah | aaah | 6.2e, String Comparison | just compare the length of the two strings | 10978 | 1.6 |

detaileddifferences | detaileddifferences | 6.2e, String Comparison | extremely simple string comparison problem | 4320 | 1.4 |

phonelist | phonelist | 6.2e, String Comparison | sort the numbers; see if num i is a prefix of num i+1 | 1955 | 4.3 |

rhyming | rhyming | 6.2e, String Comparison | compare suffix of a common word with the list of other given words | 296 | 2.5 |

smartphone | smartphone | 6.2e, String Comparison | compare prefix so far with the target string and the 3 suggestions; output 1 of 4 options with shortest number of keypre... | 354 | 2.6 |

softpasswords | softpasswords | 6.2e, String Comparison | custom string comparison; follow the requirements | 350 | 2.1 |

apaxianparent | apaxianparent | 6.2f, Really Ad Hoc | really ad hoc; the rules are specific for this problem | 707 | 1.5 |

help2 | help2 | 6.2f, Really Ad Hoc | match placeholder in one pattern with word in the other pattern; two similar placeholders in different patterns are cons... | 170 | 6.6 |

irepeatmyself | irepeatmyself | 6.2f, Really Ad Hoc | string period; complete search | 380 | 2.4 |

kolone | kolone | 6.2f, Really Ad Hoc | simulate the requirement; be careful of corner cases | 316 | 2.6 |

nimionese | nimionese | 6.2f, Really Ad Hoc | adhoc; simulate the requirement | 184 | 2.2 |

periodicstrings | periodicstrings | 6.2f, Really Ad Hoc | brute force; skip non divisor | 299 | 3.0 |

quickestimate | quickestimate | 6.2f, Really Ad Hoc | just use strlen | 4219 | 1.4 |

raggedright | raggedright | 6.2f, Really Ad Hoc | just simulate the requirement | 1708 | 1.8 |

rotatecut | rotatecut | 6.2f, Really Ad Hoc | simulation; use formula; stop after we have <4 letters | 266 | 3.0 |

textureanalysis | textureanalysis | 6.2f, Really Ad Hoc | one loop | 571 | 2.4 |

tolower | tolower | 6.2f, Really Ad Hoc | trivial string problem | 696 | 1.8 |

zipfslaw | zipfslaw | 6.2f, Really Ad Hoc | sort the words to simplify this problem; also available at UVa 10126 - Zipf's Law | 157 | 5.7 |

inflagrantedelicto | inflagrantedelicto | 6.3a, DP String, Classic | k_p is always 2 (read the problem description); k_r is the LCS of the two permutations plus one; O(n log k) solution | 75 | 4.8 |

ls | ls | 6.3a, DP String, Classic | Edit Distance variant | 176 | 5.2 |

pandachess | pandachess | 6.3a, DP String, Classic | LCS of 2 permutations → LIS; O(n log k) solution; also see UVa 10635 | 267 | 6.0 |

princeandprincess | princeandprincess | 6.3a, DP String, Classic | find LCS of two permutations; also available at UVa 10635 - Prince and Princess | 140 | 6.7 |

signals | signals | 6.3a, DP String, Classic | LCS of 2 permutations → LIS; O(n log k) solution; also see UVa 10635 | 40 | 3.1 |

cudak | cudak | 6.3b, DP String, Non Classic | s: (prefix, digits_left, sum_left); t: try [0..9]; long long | 61 | 6.4 |

digitsum | digitsum | 6.3b, DP String, Non Classic | the sum of digits have fattern, find it; use a bit of DP to avoid re-computations | 517 | 5.5 |

exam | exam | 6.3b, DP String, Non Classic | s: (pos, correct_left); t: either your friend is wrong or your friend is right, process accordingly; easier solution exi... | 891 | 1.9 |

haiku | haiku | 6.3b, DP String, Non Classic | s: (pos, target); t: try all syllables | 77 | 5.3 |

heritage | heritage | 6.3b, DP String, Non Classic | s: (cur_pos); t: try all N words in dictionary; final answer modulo prime | 348 | 5.2 |

hillnumbers | hillnumbers | 6.3b, DP String, Non Classic | digit DP; s: (prev_digit, pos, is_rising, is_lower); try digit by digit | 84 | 6.7 |

stringfactoring | stringfactoring | 6.3b, DP String, Non Classic | s: the min weight of substring [i..j]; also available at UVa 11022 - String Factoring | 57 | 5.1 |

avion | avion | 6.4a, String Matching | trivial string matching; just find 'FBI' in the input | 1361 | 1.4 |

deathknight | deathknight | 6.4a, String Matching | trivial string matching; just find 'CD' in the input | 1970 | 1.5 |

fiftyshades | fiftyshades | 6.4a, String Matching | convert input to lower case; search occurrences of word 'pink' or 'rose' | 310 | 1.4 |

geneticsearch | geneticsearch | 6.4a, String Matching | multiple string matchings | 346 | 2.1 |

hangman | hangman | 6.4a, String Matching | find specific character in the given string and replace all occurrences; repeat | 795 | 1.6 |

ostgotska | ostgotska | 6.4a, String Matching | find substring 'ae' and count its frequency | 657 | 1.7 |

powerstrings | powerstrings | 6.4a, String Matching | find s in s+s; similar with UVa 00455; also available at UVa 10298 - Power Strings | 451 | 5.2 |

quiteaproblem | quiteaproblem | 6.4a, String Matching | trivial string matching per line | 1212 | 2.1 |

redrover | redrover | 6.4a, String Matching | brute force each substring; string matching | 429 | 1.9 |

scrollingsign | scrollingsign | 6.4a, String Matching | modified string matching; complete search; also available at UVa 11576 - Scrolling Sign | 238 | 3.1 |

simon | simon | 6.4a, String Matching | trivial string matching/string comparison | 2203 | 2.4 |

simonsays | simonsays | 6.4a, String Matching | trivial string matching/string comparison | 5511 | 1.5 |

boggle | boggle | 6.4b, String Matching, 2D | 2D grid; backtracking | 323 | 3.8 |

hiddenwords | 6.4b, String Matching, 2D | 2D grid; backtracking, a bit of memoization | 6.8 | ||

kinarow | kinarow | 6.4b, String Matching, 2D | brute the top left point of each possible x or o row, then straight-line (horizontal, vertical) or two diagonals 2D stri... | 107 | 4.6 |

knightsearch | knightsearch | 6.4b, String Matching, 2D | 2D grid; backtracking or DP | 425 | 3.2 |

aliens | aliens | 6.5a, Suffix Trie/Tree/Array | Longest Repeated Substring that appears at least m times; Suffix Array; Use Sparse Table data structure to answer RMQs o... | 89 | 6.3 |

automatictrading | automatictrading | 6.5a, Suffix Trie/Tree/Array | Suffix Array; LCP of a range; use Sparse Table | 160 | 5.2 |

baza | baza | 6.5a, Suffix Trie/Tree/Array | Trie; store list of sorted indices that starts with that prefix; counting | 83 | 5.5 |

burrowswheeler | burrowswheeler | 6.5a, Suffix Trie/Tree/Array | duplicate input string; basic Suffix Array construction problem; print the required characters | 96 | 6.2 |

buzzwords | buzzwords | 6.5a, Suffix Trie/Tree/Array | Longest Repeated Substring that appears X times (2 ≤ X < N); also available at UVa 11855 - Buzzwords | 141 | 5.0 |

dvaput | dvaput | 6.5a, Suffix Trie/Tree/Array | easy Longest Repeated Substring problem | 306 | 5.7 |

repeatedsubstrings | repeatedsubstrings | 6.5a, Suffix Trie/Tree/Array | simple LRS application | 119 | 5.8 |

stringmultimatching | stringmultimatching | 6.5a, Suffix Trie/Tree/Array | Suffix Array; multiple calls of String Matching | 185 | 6.8 |

substrings | substrings | 6.5a, Suffix Trie/Tree/Array | Suffix Array; clever usage of LCP information; interesting problem | 194 | 6.5 |

suffixarrayreconstruction | suffixarrayreconstruction | 6.5a, Suffix Trie/Tree/Array | clever creative problem involving Suffix Array concept; be careful that '*' can be more than one character | 125 | 4.1 |

suffixsorting | suffixsorting | 6.5a, Suffix Trie/Tree/Array | basic Suffix Array construction problem; be careful with terminating symbol | 201 | 5.7 |

animal | animal | 6.6a, String Hashing | Singapore15 preliminary; hash the subtrees and compare them | 203 | 6.8 |

hashing | hashing | 6.6a, String Hashing | the problem description is very clear; good rolling hash practice; or use Suffix Array+Sparse Table | 142 | 7.3 |

stringmatching | stringmatching | 6.6a, String Hashing | try Rabin-Karp or KMP | 719 | 4.5 |

typo | typo | 6.6a, String Hashing | rolling hash; update hash value when character s[i] is deleted from string s; use 2 large prime modulo to be safe | 122 | 6.7 |

multigram | multigram | 6.7a, Anagram | brute force lengths that is divisor of the original length of the string; test | 221 | 2.8 |

kaleidoscopicpalindromes | kaleidoscopicpalindromes | 6.7b, Palindrome (Checking) | test all; when you try enlarging k, the answers are actually 'small' | 233 | 3.2 |

palindromesubstring | palindromesubstring | 6.7b, Palindrome (Checking) | try all pairs of O(n^2) substrings with at least 2 characters; keep the ones that are palindrome (use DP) in a sorted se... | 298 | 4.2 |

peragrams | peragrams | 6.7b, Palindrome (Checking) | only one odd frequency character can be in the center of palindrome once; the rest need to have even frequency | 1692 | 1.7 |

evilstraw | evilstraw | 6.7c, Palindrome (Generating) | greedily match leftmost char s[0]/rightmost char s[n-1] with rightmost/leftmost matching s[i], respectively | 137 | 3.8 |

names | names | 6.7c, Palindrome (Generating) | add a letter or change a letter; complete search | 368 | 4.0 |

browniepoints | browniepoints | 7.2a, Points | points and quadrants; simple; also available at UVa 10865 - Brownie Points | 154 | 2.3 |

cursethedarkness | cursethedarkness | 7.2a, Points | Euclidean dist | 596 | 2.2 |

imperfectgps | imperfectgps | 7.2a, Points | Euclidean dist; simulation | 487 | 4.2 |

logo | logo | 7.2a, Points | Euclidean dist; also available at UVa 11505 - Logo | 426 | 3.2 |

mandelbrot | mandelbrot | 7.2a, Points | the modulus operation in complex number is like Euclidean dist; simulate as asked | 616 | 3.0 |

sibice | sibice | 7.2a, Points | Euclidean dist | 7006 | 1.3 |

completingthesquare | completingthesquare | 7.2b, Lines | Euclidean dist checks; then translate a point with a vector | 548 | 1.9 |

countingtriangles | countingtriangles | 7.2b, Lines | actually the constraints simplify this problem to line segment intersection tests | 258 | 2.5 |

goatrope | goatrope | 7.2b, Lines | distance of point to line segments of a rectangle; we can use case analysis (only 8 possibilities) | 854 | 1.6 |

hurricanedanger | hurricanedanger | 7.2b, Lines | distance from point to line (not vector); be careful of precision error; work with integers | 114 | 5.9 |

logo2 | logo2 | 7.2b, Lines | n vectors that sum to 0; given n-1 vectors, find the unknown vector; also available at UVa 11519 - Logo 2 | 114 | 5.6 |

platforme | platforme | 7.2b, Lines | line segment intersection tests; N ≤ 100; complete search | 210 | 2.7 |

rafting | rafting | 7.2b, Lines | distance of points of one polygon to line segments of the other polygon; do this test for both inner to outer and outer ... | 301 | 3.4 |

segmentdistance | segmentdistance | 7.2b, Lines | if the two line segment intersects, output 0.00; otherwise, compute distance of all 4 end points to the other line segme... | 227 | 4.1 |

triangleornaments | triangleornaments | 7.2b, Lines | the problems can be decomposed into vector projections or to be precise: vector rejections | 204 | 2.1 |

trojke | trojke | 7.2b, Lines | complete search; 3 nested loops; check if three points have the same gradient | 185 | 3.0 |

unlockpattern | unlockpattern | 7.2b, Lines | complete search; Euclidean dist | 902 | 1.7 |

amsterdamdistance | amsterdamdistance | 7.2c, Circles | arcs of circles; no need to model this as an SSSP problem/Dijkstra's | 571 | 2.9 |

anthonyanddiablo | anthonyanddiablo | 7.2c, Circles | area and perimeter of a circle | 937 | 2.3 |

ballbearings | ballbearings | 7.2c, Circles | O(1) adhoc math formula exists | 227 | 3.8 |

biggest | biggest | 7.2c, Circles | find biggest area of sector using simulation; use array (not that larget) to avoid precision error | 147 | 6.6 |

dartscores | dartscores | 7.2c, Circles | simple point in circle test; all integers | 445 | 2.4 |

estimatingtheareaofacircle | estimatingtheareaofacircle | 7.2c, Circles | PI estimation experiment | 2084 | 1.6 |

fractalarea | fractalarea | 7.2c, Circles | area of progressively smaller circles | 224 | 3.1 |

halfacookie | halfacookie | 7.2c, Circles | simple point rotation (without rotation matrix); circle; chord; segment | 626 | 1.7 |

herman | herman | 7.2c, Circles | simple; area of circle; normal vs Manhattan/taxicab | 2124 | 1.5 |

ornaments | ornaments | 7.2c, Circles | arch length plus two times tangent lengths | 236 | 2.2 |

pizza2 | pizza2 | 7.2c, Circles | simple; involving circle; the formula is very easy to derive | 3316 | 1.7 |

racingalphabet | racingalphabet | 7.2c, Circles | circle; arc; simulation | 992 | 1.5 |

sanic | sanic | 7.2c, Circles | rolling a small circle inside a bigger circle; 'offset-by-one' | 115 | 2.4 |

tracksmoothing | tracksmoothing | 7.2c, Circles | actually clever; those round corners will form a circle | 194 | 1.8 |

watchdog | watchdog | 7.2c, Circles | in circle test; brute force | 212 | 2.0 |

alldifferentdirections | alldifferentdirections | 7.2d, Triangles (Trig) | use trigonometry to compute x and y displacement | 446 | 2.6 |

bazen | bazen | 7.2d, Triangles (Trig) | half area of triangle; six possible cases only | 218 | 2.7 |

billiard | billiard | 7.2d, Triangles (Trig) | enlarge the billiard table; then this is solvable with atan2 | 856 | 1.6 |

egypt | egypt | 7.2d, Triangles (Trig) | Pythagorean theorem/triple; also available at UVa 11854 - Egypt | 862 | 1.9 |

humancannonball2 | humancannonball2 | 7.2d, Triangles (Trig) | trigonometry; simple Physics | 2399 | 1.4 |

ladder | ladder | 7.2d, Triangles (Trig) | simple trigonometry problem | 6141 | 1.4 |

mountainbiking | mountainbiking | 7.2d, Triangles (Trig) | up to 4 line segments; simple trigonometry; simple Physics/Kinematic equation | 216 | 2.8 |

santaklas | santaklas | 7.2d, Triangles (Trig) | another simple trigonometry problem: sine | 422 | 2.5 |

vacuumba | vacuumba | 7.2d, Triangles (Trig) | trigonometry to measure the X and Y displacements | 689 | 1.9 |

cropeasy | cropeasy | 7.2e, Triangles + Circles | complete search 3 points/tree; check if the center is integer | 178 | 3.0 |

greedypolygons | greedypolygons | 7.2e, Triangles + Circles | the answer is the area of n smaller isosceles triangles + one full circle + a few rectangles | 302 | 1.5 |

queenspatio | queenspatio | 7.2e, Triangles + Circles | compute ring by ring; involving Trigonometry | 71 | 2.9 |

stickysituation | stickysituation | 7.2e, Triangles + Circles | see if 3 sides form a triangle; see UVa 11579 | 675 | 2.7 |

trilemma | trilemma | 7.2e, Triangles + Circles | triangle properties; sort the 3 sides first | 225 | 3.6 |

areal | areal | 7.2f, Quadrilaterals | just output 4*sqrt(a) | 3732 | 1.5 |

cetvrta | cetvrta | 7.2f, Quadrilaterals | sort the x and y points, then you will know the 4th point | 4727 | 1.3 |

flowlayout | flowlayout | 7.2f, Quadrilaterals | simulate the process; output the final answers | 965 | 2.0 |

frosting | frosting | 7.2f, Quadrilaterals | area of rectangles; but do it cleverly to avoid TLE | 303 | 3.8 |

grassseed | grassseed | 7.2f, Quadrilaterals | one pass; area of rectangle | 4980 | 1.3 |

hittingtargets | hittingtargets | 7.2f, Quadrilaterals | simple inside rectangle and circle tests | 1026 | 1.7 |

kornislav | kornislav | 7.2f, Quadrilaterals | sort the 4 edges; and think which edges should be taken | 2741 | 1.4 |

officespace | officespace | 7.2f, Quadrilaterals | rectangles; small numbers; 2D Boolean arrays | 143 | 5.5 |

pieceofcake2 | pieceofcake2 | 7.2f, Quadrilaterals | max of 4 rectangle areas; times thickness to get the volume | 2078 | 1.3 |

rectanglesurrounding | rectanglesurrounding | 7.2f, Quadrilaterals | rectangles; small; 2D Boolean arrays | 187 | 3.8 |

roundedbuttons | roundedbuttons | 7.2f, Quadrilaterals | in-rectangle/in-square test; in-4-circles tests | 176 | 2.9 |

taisformula | taisformula | 7.2f, Quadrilaterals | area of consecutive trapezoids | 923 | 1.5 |

convexhull | convexhull | 7.3a, Polygon, Easier | basic convex hull problem; be careful with duplicate points and collinear points | 644 | 4.8 |

convexhull2 | convexhull2 | 7.3a, Polygon, Easier | CH; collinear points | 107 | 7.2 |

convexpolygonarea | convexpolygonarea | 7.3a, Polygon, Easier | even more basic problem about area of polygon than Kattis - polygonarea | 703 | 1.9 |

cookiecutter | cookiecutter | 7.3a, Polygon, Easier | polygon area; polygon scaling; polygon translation | 172 | 2.4 |

cuttingcorners | cuttingcorners | 7.3a, Polygon, Easier | simulation of angle checks | 95 | 3.5 |

dartscoring | dartscoring | 7.3a, Polygon, Easier | CH; perimeter of CH | 90 | 4.4 |

jabuke | jabuke | 7.3a, Polygon, Easier | area of triangle; point in triangle; use easier method to see if area of three sub triangles equals to area of the origi... | 614 | 1.9 |

polygonarea | polygonarea | 7.3a, Polygon, Easier | basic polygon area computation; determine CCW/CW order by checking if the signed area is positive/negative, respectively... | 967 | 2.8 |

robotprotection | robotprotection | 7.3a, Polygon, Easier | simply find the area of convex hull | 236 | 2.4 |

simplepolygon | simplepolygon | 7.3a, Polygon, Easier | center of polygon; Graham's scan like angular sorting | 155 | 5.5 |

abstractart | abstractart | 7.3b, Polygon, Harder | cool area union problem; solvable with java.awt.geom.* library package; Shoelace's formula | 66 | 6.0 |

convex | convex | 7.3b, Polygon, Harder | must understand the concept of convex polygon; a bit of mathematical insights: GCD; sort | 132 | 6.4 |

largesttriangle | largesttriangle | 7.3b, Polygon, Harder | CH to remove irrelevant points; O(N^2) rotating caliper-like algorithm | 160 | 6.8 |

playingtheslots | playingtheslots | 7.3b, Polygon, Harder | similar with UVa 01111 | 75 | 3.0 |

pointinpolygon | pointinpolygon | 7.3b, Polygon, Harder | in/out and on polygon | 311 | 5.5 |

roberthood | roberthood | 7.3b, Polygon, Harder | the classic furthest pair problem; use convex hull and then rotating caliper | 376 | 4.6 |

skyline | skyline | 7.3b, Polygon, Harder | cool area subtraction problem from back to front; solvable with java.awt.geom.* library package; Shoelace's formula | 25 | 4.8 |

wrapping | wrapping | 7.3b, Polygon, Harder | rotate; translate; CH; area; also available at UVa 10652 | 223 | 3.6 |

airlinehub | airlinehub | 7.4a, 3D Geometry | gcDistance; also available at UVa 10316 - Airline Hub | 211 | 6.6 |

beavergnaw | beavergnaw | 7.4a, 3D Geometry | volumes of cylinders and cones; inclusion-exclusion; also available at UVa 10297 - Beavergnaw | 1210 | 1.4 |

bottles | bottles | 7.4a, 3D Geometry | LA 6027 - WorldFinals Warsaw12; BSTA+geometric formula; also available at UVa 01280 - Curvy Little Bottles | 217 | 3.0 |

cheese | cheese | 7.4a, 3D Geometry | binary search the answer; geometry formula; a bit of calculus if the cut intersect a sphere | 338 | 3.0 |

flowers | flowers | 7.4a, 3D Geometry | the key part of this problem is integration | 63 | 4.4 |

infiniteslides | infiniteslides | 7.4a, 3D Geometry | 3D Euclidian distance (parameterized by time t); ternary search best t that minimizes 3D distance | 63 | 3.1 |

movingday | movingday | 7.4a, 3D Geometry | output volume of the largest cuboid - V | 261 | 2.1 |

waronweather | waronweather | 7.4a, 3D Geometry | brute force; distance of 3D points; obtuse triangle checks | 100 | 3.5 |

capsules | capsules | 8.2a, Harder Backtracking | recursive backtracking with pruning; SUDOKU variant; may or may not be NP-complete | 84 | 3.2 |

committeeassignment | committeeassignment | 8.2a, Harder Backtracking | backtracking; pruning; add a member to existing committee or create a new committee; TLE with DP bitmask | 68 | 7.4 |

greatswercporto | greatswercporto | 8.2a, Harder Backtracking | use backtracking with pruning; testing up to 10! possible permutations possibly TLE | 120 | 4.1 |

holeynqueensbatman | holeynqueensbatman | 8.2a, Harder Backtracking | similar with UVa 11195 | 527 | 2.2 |

knightsfen | knightsfen | 8.2a, Harder Backtracking | Depth Limited Search (up to 11 moves); also available at UVa 10422 - Knights in FEN | 312 | 3.2 |

minibattleship | minibattleship | 8.2a, Harder Backtracking | try all possible bitmasks of nxn bits that are consistent; try installing ships via backtracking; prune as much as possi... | 140 | 2.9 |

pebblesolitaire | pebblesolitaire | 8.2a, Harder Backtracking | s: (bitmask); simulation; pick the smallest answer | 480 | 2.2 |

sumdoku | sumdoku | 8.2a, Harder Backtracking | tedious backtracking with bitmask; simplify your implementation as much as possible | 52 | 3.3 |

ecoins | ecoins | 8.2b, State-Space, BFS, E | s: (conventional-value, infotechnological-value); BFS; also available at UVa 10306 - e-Coins | 169 | 4.6 |

flipfive | flipfive | 8.2b, State-Space, BFS, E | s: (bitmask); only 2^9 = 512 grid configurations; BFS | 621 | 2.7 |

hydrasheads | hydrasheads | 8.2b, State-Space, BFS, E | s: (cur_H, cur_T); BFS; but easier solution exists | 551 | 1.7 |

illiteracy | illiteracy | 8.2b, State-Space, BFS, E | s: (string); 6 different transition rules; BFS | 126 | 2.9 |

safe | safe | 8.2b, State-Space, BFS, E | s: (convert 3x3 grid into a base 4 integer); BFS | 181 | 3.0 |

buggyrobot | buggyrobot | 8.2c, State-Space, BFS, H | s: (r, c, k); robot at (r, c) executing kth command; t: skip or follow the command (success/fail), or add new DRUL comma... | 84 | 5.2 |

buggyrobot2 | buggyrobot2 | 8.2c, State-Space, BFS, H | see Kattis - buggyrobot | 55 | 6.3 |

distinctivecharacter | distinctivecharacter | 8.2c, State-Space, BFS, H | s: (bitmask); multi-sources BFS; find bitmask that has the furthest distance to any of the source | 272 | 6.5 |

enteringthetime | enteringthetime | 8.2c, State-Space, BFS, H | s: (h1, h2, m1, m2); try adjusting each digit by +1 or -1 | 126 | 5.1 |

jabuke2 | jabuke2 | 8.2c, State-Space, BFS, H | s: (r, c); multiple call of BFS; but gets shorter each time; use 'no-memset' strategy | 40 | 6.6 |

jumpingyoshi | jumpingyoshi | 8.2c, State-Space, BFS, H | s: (u); there are up to 1m vertices but only 1m edges; build edges on the fly using a kind of 'meet in the middle' techn... | 48 | 4.7 |

keyboard | keyboard | 8.2c, State-Space, BFS, H | LA 7155 - WorldFinals Marrakech15; s: (row, col, char_typed); also available at UVa 01714 - Keyboarding | 258 | 5.0 |

ricochetrobots | ricochetrobots | 8.2c, State-Space, BFS, H | s: ((r, c) positions of the 4 robots; each robot can move to any of the 4 directions with variable lengths | 89 | 3.2 |

robotmaze | robotmaze | 8.2c, State-Space, BFS, H | s: (r, c, dir, steps); be careful of corner cases | 87 | 5.7 |

robotturtles | robotturtles | 8.2c, State-Space, BFS, H | s: (r, c, dir, bitmask_ice_castles); print solution; very tedious | 114 | 4.5 |

bigtruck | bigtruck | 8.2d, State-Space, Dijkstra | s: (city, items_picked); use Dijkstra's | 1144 | 3.2 |

bumped | bumped | 8.2d, State-Space, Dijkstra | s: (city, has_use_free_ticket); use Dijkstra's | 545 | 4.4 |

destinationunknown | destinationunknown | 8.2d, State-Space, Dijkstra | use Dijkstra's twice; one normally; one with s: (point, has_edge_g_h_used); compare the results | 101 | 5.6 |

kitchen | kitchen | 8.2d, State-Space, Dijkstra | s: (volume_of_the_n_cups); t: try all possible pourings; use Dijkstra's | 152 | 3.5 |

quantum | quantum | 8.2d, State-Space, Dijkstra | s: (bitmask); t: all of the nop operations; use Dijkstra's | 82 | 3.3 |

rainbowroadrace | rainbowroadrace | 8.2d, State-Space, Dijkstra | s: (pos, bitmask_of_7_colors); use Dijkstra's | 101 | 2.9 |

aspenavenue | aspenavenue | 8.3a, DP level 3 | sort; compute tree positions; s: (l_left, r_left), t: put next tree on the left/right; also available at UVa 11555 - Asp... | 223 | 5.8 |

busticket | busticket | 8.3a, DP level 3 | s: (day_i); t: either buy daily ticket or jump to end of period ticket (use binary search to avoid TLE) | 186 | 4.4 |

crackerbarrel | crackerbarrel | 8.3a, DP level 3 | very similar to Kattis - peggamefortwo but without the 2 alternating players; backtrack/DP on special grid | 55 | 4.0 |

eatingeverything | eatingeverything | 8.3a, DP level 3 | pizza world is a DAG; s: (pizza_stall); t: eat a (full) pizza here and stop; skip this stall; eat a pizza here and take ... | 59 | 3.7 |

exchangerates | exchangerates | 8.3a, DP level 3 | maintain the best CAD and USD each day; also available at UVa 11285 - Exchange Rates | 87 | 4.5 |

homework | homework | 8.3a, DP level 3 | s: (i, j); the currently considered character s is (i+j); t: s matches s1[i] or s2[j] | 172 | 6.7 |

ingestion | ingestion | 8.3a, DP level 3 | s: (hour, consecutive_eating, has_refrain); t: eat at this hour, refrain eating for one or two hours; floating point | 260 | 5.7 |

mailbox | mailbox | 8.3a, DP level 3 | s: (lo, hi, mailbox_left); try all; also available at UVa 00882 - The Mailbox Manufacturers Problem | 386 | 2.1 |

posterize | posterize | 8.3a, DP level 3 | s: (prev_value; k_left); t: pick one of the 256 values to be included in the k selected distinct red values | 411 | 3.0 |

protectingthecollection | protectingthecollection | 8.3a, DP level 3 | s: (r, c, dir, has_installed_a_mirror); t: just proceed or install '/' or '\' mirror at a '.' | 55 | 6.2 |

welcomeeasy | welcomeeasy | 8.3a, DP level 3 | also see Kattis - welcomehard | 655 | 2.1 |

welcomehard | welcomehard | 8.3a, DP level 3 | also see Kattis - welcomeeasy | 345 | 4.8 |

city | city | 8.3b, DP level 4 | s: (i, left_building_explode); t: use 2nd parameter properly | 94 | 6.5 |

coke | coke | 8.3b, DP level 4 | drop parameter n1; recover it from b (number of coke bought), n5, and n10; also available at UVa 10626 - Buying Coke | 304 | 5.6 |

companypicnic | companypicnic | 8.3b, DP level 4 | s: (name, has_been_matched); DP weighted matching (both cardinality and weight) on Tree | 200 | 5.0 |

johnsstack | johnsstack | 8.3b, DP level 4 | memoize sub-problem using map of vector of integers to long long | 96 | 5.9 |

mububa | mububa | 8.3b, DP level 4 | LA 7484 - Singapore15; BSTA; use the correct DP state | 267 | 7.0 |

rollercoasterfun | rollercoasterfun | 8.3b, DP level 4 | s: (T); split DPs when b = 0 and when b != 0 | 101 | 7.7 |

volumeamplification | volumeamplification | 8.3b, DP level 4 | s: (reachable); bottom-up | 50 | 7.5 |

constrainedfreedomofchoice | constrainedfreedomofchoice | 8.3c, Counting Paths, Harder | s: (row, col, last_action); t: go up/right/down based on last_action | 80 | 5.3 |

countcircuits | countcircuits | 8.3c, Counting Paths, Harder | s: (id, cur_x, cur_y); t: skip or use this vector; use offset technique to avoid negative indices | 278 | 5.8 |

favourable | favourable | 8.3c, Counting Paths, Harder | s: (cur_page); t: jump to one of the 3 sections | 304 | 4.5 |

frustratedqueue | frustratedqueue | 8.3c, Counting Paths, Harder | s: (i, n5); recover n10 and n5_at_operator; process accordingly | 68 | 4.4 |

pachinkoprobability | pachinkoprobability | 8.3c, Counting Paths, Harder | s: (pos); DAG modeling; long long | 113 | 5.8 |

ratings | ratings | 8.3c, Counting Paths, Harder | s: (id, sum_left, tie_status); t: try all possible rating scores; the tie_status parameter is important | 165 | 3.6 |

tractor | tractor | 8.3c, Counting Paths, Harder | s: (row, col, move_number), DAG; t: go up/left | 220 | 6.1 |

woodensigns | woodensigns | 8.3c, Counting Paths, Harder | s: (idx, base1, base2), t: point left, right, or both; need to use hash table as memo table | 65 | 2.3 |

hidingchickens | hidingchickens | 8.3d, DP with Bitmask | weighted MCM; small complete weighted graph; make fox goes back to the killing spot first after hiding one or two chicke... | 89 | 5.7 |

narrowartgallery | narrowartgallery | 8.3d, DP with Bitmask | interesting DP; s: (row, state_of_prev_row, k_left) | 1417 | 2.8 |

paths | paths | 8.3d, DP with Bitmask | counting paths on DAG with state s: (u, mask_of_K_colors) | 247 | 3.1 |

pebblesolitaire2 | pebblesolitaire2 | 8.3d, DP with Bitmask | backtracking suffices for Kattis - pebblesolitair; but this version needs extra memoization | 400 | 3.6 |

uxuhulvoting | uxuhulvoting | 8.3d, DP with Bitmask | s: (priest_id, mask_of_3_bits); t: try all 3 possibilities of toggling a bit per priest, keep the best | 240 | 3.2 |

wherehaveyoubin | wherehaveyoubin | 8.3d, DP with Bitmask | s: (i, mask_of_processed) - we have assign bin [0..i-1] and companies mask_of_processed; t: give consecutive bins to eac... | 30 | 5.0 |

councilling | councilling | 8.4a, Network Flow, Standard | matching; max flow; print the assignment; also available at UVa 10511 - Councilling | 89 | 7.1 |

dutyscheduler | dutyscheduler | 8.4a, Network Flow, Standard | try all possible (small range of answers); assignment problem; matching with capacity; max flow | 94 | 3.8 |

jupiter | jupiter | 8.4a, Network Flow, Standard | good modeling problem; a good exercise for those who wants to master max flow modeling | 150 | 5.8 |

maxflow | maxflow | 8.4a, Network Flow, Standard | standard max flow problem for practice; print edges used in the max flow | 531 | 6.3 |

mazemovement | mazemovement | 8.4a, Network Flow, Standard | use gcd for all pairs of vertices to construct the flow graph; then it is just a standard max flow problem | 135 | 4.4 |

mincut | mincut | 8.4a, Network Flow, Standard | standard min cut problem for practice; print vertices reachable from source s after max flow | 293 | 4.1 |

piano | piano | 8.4a, Network Flow, Standard | good modeling problem; afterwards it is just a standard max flow problem | 230 | 4.1 |

tomography | tomography | 8.4a, Network Flow, Standard | max flow; somewhat assignment problem; matching with capacity; bipartite graph: left-set: rows/right-set: col; can also ... | 239 | 3.8 |

waif | waif | 8.4a, Network Flow, Standard | two layers of graph matching; with capacity; use max flow solution | 159 | 2.7 |

water | water | 8.4a, Network Flow, Standard | max flow on undirected flow graph; add edges; rerun max flow K times (short) | 49 | 4.5 |

avoidingtheapocalypse | avoidingtheapocalypse | 8.4b, Network Flow, Variants | interesting max flow modeling; blow the vertices based on time | 191 | 4.4 |

budget | budget | 8.4b, Network Flow, Variants | max flow with lower bound | 66 | 6.8 |

chesscompetition | chesscompetition | 8.4b, Network Flow, Variants | baseball elimination problem; similar to Kattis - unfairplay | 87 | 4.9 |

congest | congest | 8.4b, Network Flow, Variants | LA 6395 - World Finals StPetersburg13; compute SSSP from downtown to other vertices; repeated edge-disjoint path computa... | 256 | 3.7 |

conveyorbelts | conveyorbelts | 8.4b, Network Flow, Variants | max flow; blow up the vertices K times; reroute edges | 89 | 3.7 |

copsandrobbers | copsandrobbers | 8.4b, Network Flow, Variants | min cut; similar to Kattis - thekingofthenorth | 125 | 3.7 |

darkness | darkness | 8.4b, Network Flow, Variants | interesting min cut problem; each light source affects all other cells at x and y units away (the z is always H); cost i... | 28 | 6.5 |

floodingfields | floodingfields | 8.4b, Network Flow, Variants | similar with UVa 11380; must be very careful | 48 | 5.5 |

landscaping | landscaping | 8.4b, Network Flow, Variants | min cut; hard to spot the required modeling | 70 | 6.0 |

marchofpenguins | marchofpenguins | 8.4b, Network Flow, Variants | max flow modeling; vertex capacities; also see UVa 11380; also available at UVa 12125 - March of the Penguins | 68 | 3.8 |

neutralground | neutralground | 8.4b, Network Flow, Variants | min cut; similar to Kattis - thekingofthenorth | 28 | 6.0 |

thekingofthenorth | thekingofthenorth | 8.4b, Network Flow, Variants | interesting min cut problem | 193 | 5.0 |

transportation | transportation | 8.4b, Network Flow, Variants | max flow with vertex capacities | 165 | 5.6 |

unfairplay | unfairplay | 8.4b, Network Flow, Variants | baseball elimination problem; similar to Kattis - chesscompetition; need to print solution too | 89 | 4.7 |

balanceddiet | balanceddiet | 8.6a, NP-hard/C, small, E | PARTITION; n ≤ 20; use DP SUBSET-SUM style | 316 | 4.0 |

equalsumseasy | equalsumseasy | 8.6a, NP-hard/C, small, E | PARTITION; generate all possible subsets with bitmask; use set to record which sums have been computed | 474 | 2.3 |

flowfree | flowfree | 8.6a, NP-hard/C, small, E | brute force combination 3^10 or 4^8; then LONGEST-PATH problem on non DAG between two end points of the same color | 109 | 4.4 |

font | font | 8.6a, NP-hard/C, small, E | count number of possible SET-COVERs; use 2^N backtracking; but use bitmask to represent small set of covered letters | 199 | 4.2 |

satisfiability | satisfiability | 8.6a, NP-hard/C, small, E | SAT(isfiability); n ≤ 20; try all possible subsets | 244 | 3.8 |

socialadvertising | socialadvertising | 8.6a, NP-hard/C, small, E | MIN-DOMINATING-SET/MIN-SET-COVER; n ≤ 20; use compact Adjacency Matrix technique | 59 | 5.1 |

tightfitsudoku | tightfitsudoku | 8.6a, NP-hard/C, small, E | SUDOKU variant; backtracking + pruning | 87 | 4.2 |

vivoparc | vivoparc | 8.6a, NP-hard/C, small, E | GRAPH-COLORING on medium-sized graph; only 4 colors are used in this problem; backtracking | 151 | 5.1 |

beanbag | beanbag | 8.6b, NP-hard/C, small, H | SET-COVER problem; T farmers can collude to give Jack the hardest possible subset of beans to be given freely to Jack | 119 | 4.9 |

busplanning | busplanning | 8.6b, NP-hard/C, small, H | MIN-CLIQUE-COVER; DP bitmask over sets | 91 | 5.4 |

coloring | coloring | 8.6b, NP-hard/C, small, H | GRAPH-COLORING; n ≤ 11; greedily set vertex 0 to have color 0 to reduce max N to 10; backtracking | 313 | 4.8 |

mapcolouring | mapcolouring | 8.6b, NP-hard/C, small, H | GRAPH-COLORING; n ≤ 16; DP over sets; O(3^n); Subset of vertices that are Independent can be 1-colored | 200 | 5.2 |

programmingteamselection | programmingteamselection | 8.6b, NP-hard/C, small, H | PARTITION-INTO-TRIANGLES; prune if #students % 3 != 0; generate up to m/3 teams; backtracking with memo | 64 | 7.2 |

antennaplacement | antennaplacement | 8.6c, NP-hard/C, special, E | MIS: V-MCBM; also available at UVa 10349 - Antenna Placement | 36 | 5.2 |

bilateral | bilateral | 8.6c, NP-hard/C, special, E | MIN-VERTEX-COVER on Bipartite Graph; MCBM; Konig's theorem that can handle the 1009 case correctly | 43 | 6.5 |

bookcircle | bookcircle | 8.6c, NP-hard/C, special, E | left set: boys; right set: girls; add edge (i, j) if boy i reads same book as girl j; MIN-VERTEX-COVER on Bipartite Grap... | 137 | 4.4 |

catvsdog | catvsdog | 8.6c, NP-hard/C, special, E | LA 4288 - NorthwesternEurope08; MIS; also available at UVa 12168 - Cat vs. Dog | 199 | 5.5 |

citrusintern | citrusintern | 8.6c, NP-hard/C, special, E | modified MIN-WEIGHT-VERTEX-COVER on tree; some edges can be ignored | 169 | 3.6 |

countingclauses | countingclauses | 8.6c, NP-hard/C, special, E | special case of 3-SAT; a bluffing task | 480 | 1.7 |

europeantrip | europeantrip | 8.6c, NP-hard/C, special, E | STEINER-TREE with 3 terminal vertices and up to 1 Steiner point; we can use two ternary searches | 297 | 3.3 |

guardianofdecency | guardianofdecency | 8.6c, NP-hard/C, special, E | LA 3415 - NorthwesternEurope05; MIS; also available at UVa 12083 - Guardian of Decency | 45 | 6.3 |

reactivity | reactivity | 8.6c, NP-hard/C, special, E | verify if a HAMILTONIAN-PATH exists in the DAG; find one topological sort of the DAG; verify if it is the only one in li... | 280 | 4.0 |

airports | airports | 8.6d, NP-hard/C, special, H | MIN-PATH-COVER; on DAG; MCBM | 92 | 6.4 |

eastereggs | eastereggs | 8.6d, NP-hard/C, special, H | BSTA; MAX-INDEPENDENT-SET on Bipartite Graph; V-MCBM | 82 | 5.2 |

ironcoal | ironcoal | 8.6d, NP-hard/C, special, H | STEINER-TREE with 3 terminal vertices and up to 1 Steiner point; SSSP on unweighted graph; BFS; similar to Kattis - jail... | 216 | 5.0 |

itcanbearranged | itcanbearranged | 8.6d, NP-hard/C, special, H | MIN-PATH-COVER; on DAG; weighted; Max Flow | 50 | 5.1 |

jailbreak | jailbreak | 8.6d, NP-hard/C, special, H | STEINER-TREE; on grid; 3 terminal vertices: 'outside' and 2 prisoners; BFS; get the best Steiner point that connects the... | 130 | 4.8 |

joggers | joggers | 8.6d, NP-hard/C, special, H | MIN-VERTEX-COVER on Tree; root tree at vertex 0; limit tree up to depth S/2 | 46 | 6.1 |

mafija | mafija | 8.6d, NP-hard/C, special, H | MAX-INDEPENDENT-SET; Special case: on Pseudoforest; use Greedy MIS; handle unvisited cycle separately | 100 | 3.7 |

ridofcoins | ridofcoins | 8.6d, NP-hard/C, special, H | not the minimizing COIN-CHANGE problem; but the maximizing one; greedy pruning; complete search on much smaller instance | 94 | 7.9 |

taxicab | taxicab | 8.6d, NP-hard/C, special, H | LA 3126 - NorthwesternEurope04; MPC on DAG; also available at UVa 01201 - Taxi Cab Scheme | 38 | 5.5 |

wedding | wedding | 8.6d, NP-hard/C, special, H | can be modeled as a 2-SAT problem; also available at UVa 11294 - Wedding | 36 | 6.7 |

arrivingontime | arrivingontime | 8.7a, BSTA+Other, Easier | BSTA: the latest starting time; use Dijkstra's to compute whether we can still arrive at meeting point on time | 79 | 6.3 |

bigboxes | bigboxes | 8.7a, BSTA+Other, Easier | BSTA+greedy | 135 | 3.5 |

charlesincharge | charlesincharge | 8.7a, BSTA+Other, Easier | BSTA: max edge that Charles can use; SSSP from 1 to $N$ passing through edges that do not exceed that; is it OK? | 149 | 4.8 |

expandingrods | expandingrods | 8.7a, BSTA+Other, Easier | bisection method; also available at UVa 10668 - Expanding Rods | 36 | 5.3 |

fencebowling | fencebowling | 8.7a, BSTA+Other, Easier | BSTA (the angle Beta) + trigonometry formulas | 64 | 2.7 |

forestforthetrees | forestforthetrees | 8.7a, BSTA+Other, Easier | gcd; BSTA+geometry in-rectangle tests | 141 | 4.1 |

gridgame | gridgame | 8.7a, BSTA+Other, Easier | BSTA + MCBM | 199 | 5.0 |

prettygoodcuberoot | prettygoodcuberoot | 8.7a, BSTA+Other, Easier | bisection method; find cube root of a very large integer; use Big Integer | 143 | 5.8 |

programmingtutors | programmingtutors | 8.7a, BSTA+Other, Easier | +perfect MCBM | 161 | 3.7 |

rockclimbing | rockclimbing | 8.7a, BSTA+Other, Easier | BSTA + BFS | 60 | 5.6 |

skijumping | skijumping | 8.7a, BSTA+Other, Easier | BSTA + heavy math/Physics; involving derivation | 56 | 3.4 |

carpet | carpet | 8.7b, BSTA+Other, Harder | binary search the length of the side; use law of cosines to test | 64 | 7.6 |

catandmice | catandmice | 8.7b, BSTA+Other, Harder | BSTA: the initial velocity of Cartesian Cat; DP TSP to verify if the cat can catch all mice in the shortest possible tim... | 141 | 6.8 |

gravamen | gravamen | 8.7b, BSTA+Other, Harder | BSTA + max flow | 45 | 6.1 |

low | low | 8.7b, BSTA+Other, Harder | LA 6398 - WorldFinals StPetersburg13; BSTA+greedy; also available at UVa 01577 - Low Power | 451 | 5.1 |

risk | risk | 8.7b, BSTA+Other, Harder | BSTA: smallest edge at the bordering regions; construct flow graph according to valid movement of troops in one turn; ru... | 86 | 6.7 |

wifi | wifi | 8.7b, BSTA+Other, Harder | +greedy; also available at UVa 11516 - WiFi | 214 | 4.3 |

bing | bing | 8.7c, Fast DS+Other, Easier | map all prefixes to frequencies using Hash Table; or use Trie | 1061 | 3.6 |

busnumbers2 | busnumbers2 | 8.7c, Fast DS+Other, Easier | complete search; use unordered_map | 377 | 3.0 |

gcds | gcds | 8.7c, Fast DS+Other, Easier | complete search; use set for speedup | 205 | 4.9 |

loopytransit | loopytransit | 8.7c, Fast DS+Other, Easier | backtracking; use set to store canonical forms, ignoring cyclic shifts | 70 | 3.2 |

reducedidnumbers | reducedidnumbers | 8.7c, Fast DS+Other, Easier | brute force the answer with fast unordered_set data structure | 168 | 3.2 |

selfsimilarstrings | selfsimilarstrings | 8.7c, Fast DS+Other, Easier | complete search as the string is short; frequency counting; use unordered_map; repetition | 181 | 3.5 |

undetected | undetected | 8.7c, Fast DS+Other, Easier | brute force; simple geometry; UFDS | 274 | 3.9 |

znanstvenik | znanstvenik | 8.7c, Fast DS+Other, Easier | rotate RxC grid 90 degrees clockwise to have easier way to remove 'first row' (now 'last column'); complete search; try ... | 210 | 3.8 |

catcoat | catcoat | 8.7d, Fast DS+Other, Harder | generate all possible genes and filter; tedious time waster; using Python itertools (product) helps; low rating misleadi... | 120 | 3.1 |

chesstournament | chesstournament | 8.7d, Fast DS+Other, Harder | use UFDS to contract vertices that are equals into super vertices; then check if the resulting directed graph is acyclic | 148 | 6.1 |

circular | circular | 8.7d, Fast DS+Other, Harder | WorldFinals Porto19; frequency counting; try all cutting positions; fast simulation | 263 | 3.1 |

clockconstruction | clockconstruction | 8.7d, Fast DS+Other, Harder | try all pairs of cells, if consistent across all k images (we can compress them using bitset), union them using UFDS | 58 | 3.2 |

dictionaryattack | dictionaryattack | 8.7d, Fast DS+Other, Harder | time limit is generous; you can generate all possible password with just 3 swaps; store in sets | 101 | 7.0 |

doublets | doublets | 8.7d, Fast DS+Other, Harder | s: (string); BFS; use trie to quickly identify neighbor that is one Hamming distance away; also available at UVa 10150 -... | 56 | 8.3 |

downfall | downfall | 8.7d, Fast DS+Other, Harder | vector of integers and UFDS simulation; modify merge by min id | 31 | 5.2 |

kletva | kletva | 8.7d, Fast DS+Other, Harder | heavy 1D array manipulation; 4 symmetries (left-right; top-down); keep the canonical form; output number of unique keys | 45 | 7.4 |

magicallights | magicallights | 8.7d, Fast DS+Other, Harder | LA 7487 - Singapore15; flatten the tree with DFS; use Fenwick Tree for Range Odd Query; use long long | 309 | 5.4 |

numbersetseasy | numbersetseasy | 8.7d, Fast DS+Other, Harder | primes; sieve of Eratosthenes; prime factors; Union Find Disjoint Sets; output final number of disjoint sets; also see K... | 289 | 4.4 |

numbersetshard | numbersetshard | 8.7d, Fast DS+Other, Harder | primes; sieve of Eratosthenes; prime factors; Union Find Disjoint Sets; output final number of disjoint sets; also see K... | 175 | 6.6 |

setstack | setstack | 8.7d, Fast DS+Other, Harder | simulation of stack operations with vector but also with help of efficient map and set | 161 | 5.9 |

sparklesseven | sparklesseven | 8.7d, Fast DS+Other, Harder | seven nested loops with fast DS | 52 | 5.7 |

areyoulistening | areyoulistening | 8.7e, Geometry+CS | brute force; try all possible answers; circle intersection tests | 410 | 2.8 |

beehives | beehives | 8.7e, Geometry+CS | 2D nested loops; Euclidean dist; use hypot; easy | 665 | 2.1 |

collidingtraffic | collidingtraffic | 8.7e, Geometry+CS | try all pairs of boats; 0.0 if one pair collide; or, use a quadratic equation; also available at UVa 11574 - Colliding T... | 48 | 5.0 |

cranes | cranes | 8.7e, Geometry+CS | circle-circle intersection; backtracking or brute force subsets with bitmask; also available at UVa 11515 - Cranes | 137 | 3.8 |

doggopher | doggopher | 8.7e, Geometry+CS | complete search; Euclidean distance dist; also available at UVa 10310 - Dog and Gopher | 119 | 2.5 |

splat | splat | 8.7e, Geometry+CS | bruce force N points; bottom to top; point in circle tests | 353 | 2.1 |

unlockpattern2 | unlockpattern2 | 8.7e, Geometry+CS | brute force permutation + point-related geometry; S vs A and their invalid positions are tricky | 70 | 2.9 |

unusualdarts | unusualdarts | 8.7e, Geometry+CS | try all 7! possible polygons; verify simple polygon by testing all pairs of line segments; area; a bit of probability | 160 | 5.4 |

dejavu | dejavu | 8.7f, Geometry+Other | observation; count X and Y frequencies of points; combinatorics | 182 | 4.0 |

findinglines | findinglines | 8.7f, Geometry+Other | randomly pick two points; there is a good chance that 20% or more points are on that line defined by those two points | 209 | 6.3 |

humancannonball | humancannonball | 8.7f, Geometry+Other | build the travel time graph with Euclidean distance computations; use Floyd-Warshall | 757 | 2.2 |

particlecollision | particlecollision | 8.7f, Geometry+Other | translate point w.r.t. vector (parameterized by time t); Pythagorean; roots of quadratic equation; case analysis | 81 | 3.1 |

subwayplanning | subwayplanning | 8.7f, Geometry+Other | not easy, rating deceptive: prune points with distance ≤ d to (0, 0); compute min/max possible angles for the rest us... | 92 | 2.1 |

tram | tram | 8.7f, Geometry+Other | ternary search a on unimodal function: sum of distances of N points to line y = x + a | 76 | 2.7 |

urbandesign | urbandesign | 8.7f, Geometry+Other | observation: each time a line segment that connects two query points crosses a street (infinite line), the residential t... | 133 | 4.1 |

walkway | walkway | 8.7f, Geometry+Other | we can build the graph and compute area of trapezoid using simple geometry; SSSP on weighted graph; Dijkstra's | 190 | 3.4 |

bicikli | bicikli | 8.7g, Graph+Other | reachability test from source and sink; toposort; counting paths on DAG; modulo | 103 | 6.4 |

crowdcontrol | crowdcontrol | 8.7g, Graph+Other | maximin path problem; MST; DFS from train station to BAPC; block unused edges | 100 | 3.8 |

deadend | deadend | 8.7g, Graph+Other | process each CC separately; if a CC is a tree, it is an easier special case; else, prune the leaves | 254 | 3.4 |

diplomacy | diplomacy | 8.7g, Graph+Other | brute force; try all possible governors as source; BFS propagation | 73 | 5.8 |

findpoly | findpoly | 8.7g, Graph+Other | worded like a geometry problem; but actually just a simple graph DS+traversal problem | 58 | 3.4 |

gears2 | gears2 | 8.7g, Graph+Other | graph reachability test; cycle with equal ratio is actually OK; math fraction | 95 | 3.7 |

gridmst | gridmst | 8.7g, Graph+Other | Singapore15 preliminary; rectilinear MST problem; small 2D grid; multi-sources BFS to construct short edges; Kruskal's t... | 245 | 7.4 |

primepath | primepath | 8.7g, Graph+Other | BFS; involving prime numbers; also available at UVa 12101 - Prime Path | 469 | 2.2 |

units | units | 8.7g, Graph+Other | small implicit tree traversal; sort and normalize the output | 194 | 3.5 |

vuk | vuk | 8.7g, Graph+Other | multi-sources BFS from all trees; BSTA+graph traversal from 'V' to 'J' passing only cells that are within 'ans' distance... | 86 | 4.1 |

digitdivision | digitdivision | 8.7h, Mathematics+Other | let p be the number of partitions (use linear pass modulo m to count this); the answer is then 2^(p-1)%(10^9+7) | 66 | 5.0 |

dunglish | dunglish | 8.7h, Mathematics+Other | simple combinatorics aided with a fast data structure | 351 | 2.4 |

emergency | emergency | 8.7h, Mathematics+Other | the problem is posed as an SSSP problem on special graph; but turns out a simple formula solves the problem; Big Integer | 319 | 3.7 |

highwaytomountfansipan | highwaytomountfansipan | 8.7h, Mathematics+Other | count frequencies of words in dictionary that starts with a certain character and length; combinatorics; modulo | 65 | 3.4 |

industrialspy | industrialspy | 8.7h, Mathematics+Other | brute force recursive bitmask with prime check; also available at UVa 12218 - An Industrial Spy | 556 | 3.3 |

megainversions | megainversions | 8.7h, Mathematics+Other | a bit of combinatorics; use Fenwick Tree to compute smaller/larger numbers quickly | 333 | 5.0 |

ontrack | ontrack | 8.7h, Mathematics+Other | DFS on Tree; the input is a tree, we can try all possible junctions as the critical junction | 156 | 4.1 |

thedealoftheday | thedealoftheday | 8.7h, Mathematics+Other | simple combinatorics (read the problem carefully) with either backtracking or DP (overkill; small state); the main issue... | 116 | 2.2 |

dragonball1 | dragonball1 | 8.7i, Graph+DP | Multi-Source Shortest Paths; DP (or brute force) TSP | 80 | 4.2 |

globalwarming | globalwarming | 8.7i, Graph+DP | the biggest clique has at most 22 vertices; matching in (small) general graph (component) | 100 | 6.1 |

ntnuorienteering | ntnuorienteering | 8.7i, Graph+DP | get APSP info between campuses; sort lectures by increasing start time; DP O(L^2); try all possible starting lectures | 123 | 4.5 |

shopping | shopping | 8.7i, Graph+DP | SSSP from up to 10 stores; compute APSP information for TSP; then use DP (or brute force), n ≤ 10 | 27 | 6.0 |

speedyescape | speedyescape | 8.7i, Graph+DP | compute shortest paths information using Floyd-Warshall; then use DP; also available at UVa 11693 - Speedy Escape | 112 | 5.5 |

treasurediving | treasurediving | 8.7i, Graph+DP | SSSP from source and all idol positions; TSP-like but there is a knapsack style parameter 'air_left'; use backtracking | 87 | 7.3 |

walkforest | walkforest | 8.7i, Graph+DP | counting paths in DAG; build the DAG; Dijkstra's from 'home'; also available at UVa 10917 - A Walk Through the Forest | 245 | 4.4 |

centsavings | centsavings | 8.7j, Other+DP 1D RSQ/RMQ | 1D RSQ DP for sum of prices from [i..j]; round up/down; s: (idx, d_left); t: try all positioning of the next divider | 531 | 4.6 |

dvoniz | dvoniz | 8.7j, Other+DP 1D RSQ/RMQ | involving 1D RSQ DP; binary search the answer | 47 | 7.1 |

eko | eko | 8.7j, Other+DP 1D RSQ/RMQ | sort the tree heights; BSTA + binary search for the highest non-cut tree + 1D Range Sum Query | 123 | 4.7 |

hnumbers | hnumbers | 8.7j, Other+DP 1D RSQ/RMQ | need 1D Range Sum Query; also available at UVa 11105 - Semi-prime H-numbers | 75 | 5.3 |

ozljeda | ozljeda | 8.7j, Other+DP 1D RSQ/RMQ | math observation; the Xorbonacci pattern repeats after $K+1$ steps; to speed up the answer, we can do Range Xor Query | 87 | 4.3 |

program | program | 8.7j, Other+DP 1D RSQ/RMQ | somewhat like Sieve of Eratosthenes initially and 1D RSQ DP speedup at the end | 89 | 7.7 |

tiredterry | tiredterry | 8.7j, Other+DP 1D RSQ/RMQ | double the record to simplify wrap around issue; precompute number of sleep per any subranges; brute force all seconds | 164 | 3.3 |

cpu | cpu | 8.7k, Three++ Components, E | math (Sieve of Eratosthenes); brute force pair of primes; a bit of linear algebra; range queries/set data structure | 38 | 4.4 |

enviousexponents | enviousexponents | 8.7k, Three++ Components, E | mathematical insights; brute force number of bits used; greedily set k bits on | 166 | 4.6 |

gettingthrough | gettingthrough | 8.7k, Three++ Components, E | BSTA+graph connectivity; Union-Find; similar to UVa 00295 | 51 | 7.2 |

glyphrecognition | glyphrecognition | 8.7k, Three++ Components, E | brute force k, BSTA inner and outer radius of k-gon; point in polygon tests | 202 | 2.7 |

icpccamp | icpccamp | 8.7k, Three++ Components, E | BSTA+greedy matching with help of a multiset | 171 | 4.6 |

ljutnja | ljutnja | 8.7k, Three++ Components, E | sort the wishes of N kids first; then BSTA+greedy | 174 | 5.0 |

mobilization | mobilization | 8.7k, Three++ Components, E | brute force with small budget first; identify top 2 troop types; re-simulate with full budget | 73 | 3.5 |

pyro | pyro | 8.7k, Three++ Components, E | brute force with bitmask and fast set data structure | 143 | 5.4 |

researchproductivityindex | researchproductivityindex | 8.7k, Three++ Components, E | sort papers by decreasing probability; brute force k and greedily submit k best papers; DP probability; keep max | 358 | 3.2 |

wheels | wheels | 8.7k, Three++ Components, E | Euclidean distances; DFS traversal; gcd | 123 | 4.1 |

carpool | carpool | 8.7l, Three++ Components, H | Floyd-Warshall/APSP; iterative brute force subset and permutation; DP; also available at UVa 11288 - Carpool | 40 | 6.4 |

clockpictures | clockpictures | 8.7l, Three++ Components, H | sort angles; compute 'string' of differences of adjacent angles (use modulo); min lexicographic rotation; use SA or KMP | 463 | 5.5 |

guessthenumbers | guessthenumbers | 8.7l, Three++ Components, H | brute force permute up to 5!; recursive string parsing (simple BNF); also available at UVa 12392 - Guess the Numbers | 64 | 8.5 |

installingapps | installingapps | 8.7l, Three++ Components, H | sort the apps greedily by si-di (need observation); DP KNAPSACK; print solution | 160 | 6.9 |

sprocketscience | sprocketscience | 8.7l, Three++ Components, H | complete search with bitmask; math/LCM; sorting/comparison of vectors | 28 | 6.0 |

tightlypacked | tightlypacked | 8.7l, Three++ Components, H | complete search + BSTA + a simple geometry rectangle area analysis | 72 | 5.9 |

weather | weather | 8.7l, Three++ Components, H | pre-compute factorial up to 20; brute force O(n^3) possible s/c/r (derive f) events; compress observations with same com... | 196 | 3.3 |

joggingtrails | joggingtrails | 9.chi1, Chinese Postman | basic Chinese Postman Problem; also available at UVa 10296 - Jogging Trails | 75 | 5.0 |

chineseremainder | chineseremainder | 9.chi2, Chinese Remainder | basic CRT; 2 linear congruences; Big Integer | 343 | 5.4 |

generalchineseremainder | generalchineseremainder | 9.chi2, Chinese Remainder | general CRT; 2 linear congruences | 362 | 3.7 |

granica | granica | 9.chi2, Chinese Remainder | CRT; GCD of all N differences of 2 numbers | 95 | 6.2 |

heliocentric | heliocentric | 9.chi2, Chinese Remainder | CRT or brute force | 1030 | 1.8 |

remainderreminder | remainderreminder | 9.chi2, Chinese Remainder | a bit of brute force + sorting; generalized CRT | 124 | 5.2 |

closestpair1 | closestpair1 | 9.clos, Closest Pair | classic closest pair problem - the easier one | 269 | 5.7 |

base2palindrome | base2palindrome | 9.cons, Construction | construct all possible base 2 palindromes; put into a set to remove duplicates and maintain order; output the M-th one | 385 | 4.4 |

cake | cake | 9.cons, Construction | greedy construction; row by row (or col by col) | 110 | 4.1 |

canvasline | canvasline | 9.cons, Construction | greedy construction; try to put peg as rightmost as possible | 202 | 4.0 |

cuchitunnels | cuchitunnels | 9.cons, Construction | greedy | 352 | 3.1 |

espressobucks | espressobucks | 9.cons, Construction | easy brute force construction; small nxm; not about Min-Vertex-Cover | 159 | 2.4 |

exofficio | exofficio | 9.cons, Construction | we can use BFS spanning tree from center of the grid; be careful of corner cases | 41 | 7.5 |

harddrive | harddrive | 9.cons, Construction | greedy construction; set first bit to 1 if c is odd; then repeat '010' to maximize flips | 341 | 3.1 |

knapsackpacking | knapsackpacking | 9.cons, Construction | reconstruct the original n integers that produces the given 2^n subset sums | 37 | 5.3 |

leftandright | leftandright | 9.cons, Construction | greedy construction; start with Le = Ri = 1; an 'L' advances Ri; an 'R' prints indices from Ri down to Le and sets Le = ... | 775 | 3.6 |

matchsticks | matchsticks | 9.cons, Construction | greedy construction; largest: 7/1(11...11); smallest is a bit tricky, brute force small numbers to get the pattern | 186 | 4.4 |

newfiber | newfiber | 9.cons, Construction | to maximize number of equal degree in the resulting tree, greedily pick vertex with smallest degree first; corner case w... | 321 | 3.1 |

ovalwatch | ovalwatch | 9.cons, Construction | greedy construction; sort the legs from top to down; create solution following that 'topological' order | 96 | 3.6 |

plowking | plowking | 9.cons, Construction | greedy construction; reverse MST problem | 92 | 3.2 |

poplava | poplava | 9.cons, Construction | actually there is a rather simple construction algorithm to achieve the required requirement | 105 | 3.4 |

ternarianweights | ternarianweights | 9.cons, Construction | PARTITION variant; complete search with bitmask up to 2^20 (1+log3(10^9)); use map data structure; or greedy constructio... | 293 | 3.8 |

batteries | batteries | 9.eggd, Egg Dropping Puzzle | Egg dropping puzzle with just 2 batteries; special case | 146 | 3.6 |

powereggs | powereggs | 9.eggd, Egg Dropping Puzzle | Egg dropping puzzle; similar to UVa 10934 | 92 | 5.2 |

golfbot | golfbot | 9.fast, Fast Fourier Trans | count frequencies dist of each reachable distance in one shot; use FFT to multiply dist*dist; count distances reachable ... | 133 | 6.1 |

polymul2 | polymul2 | 9.fast, Fast Fourier Trans | basic polynomial multiplication problem that needs an O(n log n) algorithm; also see Kattis - polymul1 | 227 | 6.8 |

tiles | tiles | 9.fast, Fast Fourier Trans | the low rating is misleading; modified sieve to count number of divisors d of i; interpret d as polynomial pd; use FFT t... | 246 | 2.9 |

houseofcards | houseofcards | 9.form, Formulas/Theorems | number of cards for certain height h is h * (3*h + 1) / 2; use Python to handle Big Integer | 432 | 3.4 |

janitortroubles | janitortroubles | 9.form, Formulas/Theorems | Brahmagupta's formula | 745 | 1.5 |

sjecista | sjecista | 9.form, Formulas/Theorems | number of intersections of diagonals in a convex polygon | 581 | 1.9 |

seti | seti | 9.gaus, Gauss Elimination | n equations and n unknowns; but there are division under modulo, so use Gaussian elimination with modular multiplicative... | 52 | 3.1 |

pizza | pizza | 9.grad, Gradient Descent | gradient descent | 252 | 4.5 |

starnotatree | starnotatree | 9.grad, Gradient Descent | gradient descent | 39 | 5.3 |

amazing | amazing | 9.inte, Interactive Problem | run DFS and react based on the output of the program | 215 | 5.2 |

askmarilyn | askmarilyn | 9.inte, Interactive Problem | the famous Monty hall problem in interactive format | 135 | 4.2 |

blackout | blackout | 9.inte, Interactive Problem | interactive game theory; block one row; mirror jury's move | 129 | 3.1 |

crusaders | crusaders | 9.inte, Interactive Problem | another nice interactive problem about binary search | 34 | 7.4 |

guess | guess | 9.inte, Interactive Problem | interactive problem; binary search | 1682 | 2.7 |

ninetynine | ninetynine | 9.inte, Interactive Problem | interactive game theory; analyze the losing states | 200 | 2.6 |

aqueducts | aqueducts | 9.kuhn, Kuhn-Munkres | build bipartite graph; weighted MCBM; Hungarian | 51 | 6.0 |

cheatingatwar | cheatingatwar | 9.kuhn, Kuhn-Munkres | build weighted bipartite graph K_{26,26}; L: Yraglac's card; R: Opponent's card; assign value: 2/1/0; weighted M... |
97 | 3.1 |

engaging | engaging | 9.kuhn, Kuhn-Munkres | LA 8437 - HoChiMinhCity17; Hungarian; print solution | 135 | 5.8 |

cheeseifyouplease | cheeseifyouplease | 9.line, Linear Programming | simple Linear Programming problem; use Simplex | 51 | 3.3 |

maximumrent | maximumrent | 9.line, Linear Programming | basic Linear Programming problem with integer output; we can use simplex algorithm or another simpler solution | 241 | 3.1 |

chewbacca | chewbacca | 9.lowe, Lowest Common Anc | complete short k-ary tree; binary heap indexing; LCA | 186 | 3.6 |

rootedsubtrees | rootedsubtrees | 9.lowe, Lowest Common Anc | let d be the number of vertices that are strictly between r and p, inclusive (computed using LCA); derive formula w.r.t ... | 106 | 3.2 |

catering | catering | 9.minc, Min Cost (Max) Flow | LA 7152 - WorldFinals Marrakech15; MCMF modeling | 246 | 3.9 |

mincostmaxflow | mincostmaxflow | 9.minc, Min Cost (Max) Flow | very basic MCMF problem; good starting point | 232 | 5.3 |

ragingriver | ragingriver | 9.minc, Min Cost (Max) Flow | MCMF; unit capacity and unit cost | 96 | 7.1 |

tourist | tourist | 9.minc, Min Cost (Max) Flow | min cost two flows from NW to SE; MCMF variant | 63 | 6.3 |

inquiryi | inquiryi | 9.slid, Sliding Window | sliding window; maintain left and right pointers | 25 | 3.2 |

martiandna | martiandna | 9.slid, Sliding Window | sliding window variant 2; maintain left pointer and histogram of frequencies; keep the smallest window size | 297 | 2.4 |

sound | sound | 9.slid, Sliding Window | sliding window variant 4; max and min; similar to Kattis - treeshopping | 104 | 5.3 |

cardboardcontainer | cardboardcontainer | 9.sqrt, Square Root Decomp | two out of L, W, and H must be ≤ sqrt(V); brute force L and W in sqrt(V)*sqrt(V) and test if V is divisible by (L*W) | 141 | 2.5 |

modulodatastructures | modulodatastructures | 9.sqrt, Square Root Decomp | basic problem that can be solved with Square Root Decomposition technique | 277 | 4.6 |