Halim Book Starred Problems (Competitive Programming 4 and 5, Steven Halim) Source: https://cpbook.net/methodstosolve?oj=all&topic=all&quality=starred&difficulty=all Problems: 1429 | UVa: 558 | Kattis: 670 | LeetCode: 201 | Solved: 125 Rows are ordered by book chapter and section. Points are the book's difficulty estimate; DACU is UVa's distinct accepted user count. # | Judge | ID | Title | Section | Topic | Hint | DACU | Points | CP5 | Solved | URL -----+----------+-----------------------------+-----------------------------------------------------------------------------+---------+--------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------+--------+-----+--------+----------------------------------------------------------------------------------------------------------- 1 | UVa | 13025 | | 1.4a | One-Liner I/O | giveaway, just print the one-line answer | - | 0.0 | no | no | https://onlinejudge.org/external/130/13025.pdf 2 | Kattis | carrots | carrots | 1.4a | One-Liner I/O | just print P | 15155 | 1.3 | no | no | https://open.kattis.com/problems/carrots 3 | Kattis | hello | hello | 1.4a | One-Liner I/O | just print "Hello World!" | 39217 | 1.2 | no | yes | https://open.kattis.com/problems/hello 4 | LeetCode | lc2469 | Convert the Temperature | 1.4a | One-Liner I/O | simple C to K/F conversion | 0 | 2.0 | yes | yes | https://leetcode.com/problems/convert-the-temperature/ 5 | Kattis | thelastproblem | thelastproblem | 1.4a | One-Liner I/O | S can have space(s) | 76 | 1.8 | no | no | https://open.kattis.com/problems/thelastproblem 6 | UVa | 10071 | | 1.4b | I/O + Sequences Only | super simple: output 2*v*t | - | 0.0 | no | yes | https://onlinejudge.org/external/100/10071.pdf 7 | UVa | 11614 | | 1.4b | I/O + Sequences Only | root of a quadratic equation | - | 0.0 | no | no | https://onlinejudge.org/external/116/11614.pdf 8 | Kattis | r2 | r2 | 1.4b | I/O + Sequences Only | just print 2*S-R1 | 14929 | 1.2 | no | no | https://open.kattis.com/problems/r2 9 | Kattis | conteststruggles | conteststruggles | 1.4c | Selection Only, 2 Cases | simple formula; check if answer in [0..100] | 729 | 2.2 | yes | no | https://open.kattis.com/problems/conteststruggles 10 | Kattis | isithalloween | isithalloween | 1.4c | Selection Only, 2 Cases | if-else; 2 cases | 3761 | 1.3 | no | no | https://open.kattis.com/problems/isithalloween 11 | Kattis | laptopsticker | laptopsticker | 1.4c | Selection Only, 2 Cases | if-else; 2 cases; note: one centimeter for both sides | 3329 | 1.5 | yes | no | https://open.kattis.com/problems/laptopsticker 12 | LeetCode | lc3560 | Find Minimum Log Transportation Cost | 1.4c | Selection Only, 2 Cases | if-else; 2 cases | 0 | 2.0 | yes | no | https://leetcode.com/problems/find-minimum-log-transportation-cost/ 13 | Kattis | moscowdream | moscowdream | 1.4c | Selection Only, 2 Cases | if-else; 2 cases; check n ≥ 3 | 3902 | 1.8 | no | no | https://open.kattis.com/problems/moscowdream 14 | Kattis | vajningsplikt | vajningsplikt | 1.4c | Selection Only, 2 Cases | selection; multiple cases; be careful | 788 | 2.1 | yes | no | https://open.kattis.com/problems/vajningsplikt 15 | Kattis | grading | grading | 1.4d | Selection Only, 3+ Cases | 6 cases | 2744 | 1.5 | yes | no | https://open.kattis.com/problems/grading 16 | LeetCode | lc2119 | A Number After a Double Reversal | 1.4d | Selection Only, 3+ Cases | True if num is 0; otherwise True only if num is not divisible by 10 | 0 | 2.0 | yes | no | https://leetcode.com/problems/a-number-after-a-double-reversal/ 17 | Kattis | onechicken | onechicken | 1.4d | Selection Only, 3+ Cases | 4 cases; piece vs pieces | 6464 | 1.6 | no | no | https://open.kattis.com/problems/onechicken 18 | Kattis | provincesandgold | provincesandgold | 1.4d | Selection Only, 3+ Cases | 6 cases | 4756 | 1.4 | no | no | https://open.kattis.com/problems/provincesandgold 19 | Kattis | sith | sith | 1.4d | Selection Only, 3+ Cases | 3 cases | 1137 | 1.6 | yes | no | https://open.kattis.com/problems/sith 20 | Kattis | temperature | temperature | 1.4d | Selection Only, 3+ Cases | 3 cases; derive formula | 1776 | 2.2 | no | no | https://open.kattis.com/problems/temperature 21 | Kattis | testdrive | testdrive | 1.4d | Selection Only, 3+ Cases | 4 cases | 848 | 2.1 | yes | no | https://open.kattis.com/problems/testdrive 22 | UVa | 01124 | | 1.4e | Repetition Only | LA 2681 - SouthEasternEurope06; just echo/re-print the input again | - | 0.0 | no | no | https://onlinejudge.org/external/11/1124.pdf 23 | UVa | 11547 | | 1.4e | Repetition Only | a one liner O(1) solution exists | - | 0.0 | no | no | https://onlinejudge.org/external/115/11547.pdf 24 | Kattis | different | different | 1.4e | Repetition Only | use abs function per test case | 8964 | 2.3 | no | no | https://open.kattis.com/problems/different 25 | LeetCode | lc1281 | Subtract the Product and Sum of Digits of an Integer | 1.4e | Repetition Only | break n into digits; do as asked | 0 | 2.0 | yes | yes | https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/ 26 | Kattis | qaly | qaly | 1.4e | Repetition Only | trivial loop | 5955 | 1.2 | no | no | https://open.kattis.com/problems/qaly 27 | Kattis | tarifa | tarifa | 1.4e | Repetition Only | one pass; array not needed | 9768 | 1.3 | no | no | https://open.kattis.com/problems/tarifa 28 | Kattis | timeloop | timeloop | 1.4e | Repetition Only | just print 'num Abracadabra' N times | 17170 | 1.3 | no | no | https://open.kattis.com/problems/timeloop 29 | UVa | 11172 | | 1.4f | Multiple TC + Selection | very easy; one liner | - | 0.0 | no | no | https://onlinejudge.org/external/111/11172.pdf 30 | UVa | 12250 | | 1.4f | Multiple TC + Selection | LA 4995 - KualaLumpur10; if-else | - | 0.0 | no | no | https://onlinejudge.org/external/122/12250.pdf 31 | UVa | 12372 | | 1.4f | Multiple TC + Selection | just check if all L, W, H ≤ 20 | - | 0.0 | no | no | https://onlinejudge.org/external/123/12372.pdf 32 | Kattis | eligibility | eligibility | 1.4f | Multiple TC + Selection | 3 cases | 1741 | 1.6 | no | no | https://open.kattis.com/problems/eligibility 33 | Kattis | helpaphd | helpaphd | 1.4f | Multiple TC + Selection | 2 cases | 2044 | 1.6 | no | no | https://open.kattis.com/problems/helpaphd 34 | Kattis | leftbeehind | leftbeehind | 1.4f | Multiple TC + Selection | 4 cases | 2014 | 1.6 | no | no | https://open.kattis.com/problems/leftbeehind 35 | Kattis | oddities | oddities | 1.4f | Multiple TC + Selection | 2 cases | 11523 | 1.3 | no | no | https://open.kattis.com/problems/oddities 36 | UVa | 12279 | | 1.4g | Control Flow, Level 1 | simple linear scan | - | 0.0 | no | no | https://onlinejudge.org/external/122/12279.pdf 37 | LeetCode | lc1431 | Kids With the Greatest Number of Candies | 1.4g | Control Flow, Level 1 | simple one pass check; leetcode-75 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/ 38 | Kattis | licensetolaunch | licensetolaunch | 1.4g | Control Flow, Level 1 | easy linear pass | 1969 | 1.4 | no | yes | https://open.kattis.com/problems/licensetolaunch 39 | UVa | 11799 | | 1.4h | Control Flow, Level 2 | one linear scan; find max value | - | 0.0 | no | no | https://onlinejudge.org/external/117/11799.pdf 40 | UVa | 13130 | | 1.4h | Control Flow, Level 2 | simple | - | 0.0 | no | no | https://onlinejudge.org/external/131/13130.pdf 41 | LeetCode | lc2169 | Count Operations to Obtain Zero | 1.4h | Control Flow, Level 2 | simulate as asked | 0 | 2.0 | yes | no | https://leetcode.com/problems/count-operations-to-obtain-zero/ 42 | UVa | 11364 | | 1.4i | Control Flow, Level 3 | linear scan to get l and r; answer = 2*(r-l) | - | 0.0 | no | no | https://onlinejudge.org/external/113/11364.pdf 43 | UVa | 11764 | | 1.4i | Control Flow, Level 3 | one linear scan to count high low jumps | - | 0.0 | no | no | https://onlinejudge.org/external/117/11764.pdf 44 | LeetCode | lc2455 | Average Value of Even Numbers That Are Divisible by Three | 1.4i | Control Flow, Level 3 | even+divisible by 3 = divisible by 6 | 0 | 2.0 | yes | no | https://leetcode.com/problems/average-value-of-even-numbers-that-are-divisible-by-three/ 45 | Kattis | oddgnome | oddgnome | 1.4i | Control Flow, Level 3 | linear pass | 2388 | 1.6 | no | no | https://open.kattis.com/problems/oddgnome 46 | Kattis | statistics | statistics | 1.4i | Control Flow, Level 3 | one pass; array not needed | 2942 | 1.7 | no | no | https://open.kattis.com/problems/statistics 47 | UVa | 11078 | | 1.4j | Function | one linear scan; max function | - | 0.0 | no | no | https://onlinejudge.org/external/110/11078.pdf 48 | UVa | 11332 | | 1.4j | Function | simple recursion | - | 0.0 | no | no | https://onlinejudge.org/external/113/11332.pdf 49 | Kattis | artichoke | artichoke | 1.4j | Function | LA 7150 - WorldFinals Marrakech15; linear scan; probably one of the easiest WorldFinals problem; also available at UVa 0... | 1390 | 2.8 | no | no | https://open.kattis.com/problems/artichoke 50 | Kattis | digits | digits | 1.4j | Function | direct simulation; also available at UVa 11687 - Digits | 214 | 3.5 | no | no | https://open.kattis.com/problems/digits 51 | Kattis | filip | filip | 1.4j | Function | create a 'reverse string' function; then if-else check | 6345 | 1.3 | no | no | https://open.kattis.com/problems/filip 52 | LeetCode | lc2180 | Count Integers With Even Digit Sum | 1.4j | Function | use sum-of-digits function | 0 | 2.0 | yes | no | https://leetcode.com/problems/count-integers-with-even-digit-sum/ 53 | Kattis | mia | mia | 1.4j | Function | just if-else check | 1136 | 2.1 | no | no | https://open.kattis.com/problems/mia 54 | UVa | 01585 | | 1.4k | 1D Array, Easier | LA 3354 - Seoul05; very easy one pass algorithm | - | 0.0 | no | no | https://onlinejudge.org/external/15/1585.pdf 55 | UVa | 12015 | | 1.4k | 1D Array, Easier | traverse the list twice | - | 0.0 | no | no | https://onlinejudge.org/external/120/12015.pdf 56 | Kattis | acm | acm | 1.4k | 1D Array, Easier | simple simulation; one pass | 3526 | 1.5 | no | yes | https://open.kattis.com/problems/acm 57 | Kattis | cetiri | cetiri | 1.4k | 1D Array, Easier | sort 3 number helps; 3 cases | 1165 | 1.9 | no | no | https://open.kattis.com/problems/cetiri 58 | LeetCode | lc1491 | Average Salary Excluding the Minimum and Maximum Salary | 1.4k | 1D Array, Easier | (sum-max-min)/len; programming-skills | 0 | 2.0 | yes | yes | https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary/ 59 | Kattis | lineup | lineup | 1.4k | 1D Array, Easier | sort ascending/descending and compare; or linear pass | 3703 | 1.6 | no | yes | https://open.kattis.com/problems/lineup 60 | Kattis | lostlineup | lostlineup | 1.4k | 1D Array, Easier | simple 1D array manipulation | 550 | 1.5 | no | no | https://open.kattis.com/problems/lostlineup 61 | UVa | 11349 | | 1.4l | 2D Array, Easier | use long long to avoid issues | - | 0.0 | no | no | https://onlinejudge.org/external/113/11349.pdf 62 | Kattis | hakkari | hakkari | 1.4l | 2D Array, Easier | find indices of the '*' | 659 | 1.3 | yes | no | https://open.kattis.com/problems/hakkari 63 | LeetCode | lc1572 | Matrix Diagonal Sum | 1.4l | 2D Array, Easier | sum the diagonals; do not overcount the center cell for odd n; programming-skills | 0 | 2.0 | yes | yes | https://leetcode.com/problems/matrix-diagonal-sum/ 64 | UVa | 12658 | | 1.4m | Easy | character recognition check | - | 0.0 | no | no | https://onlinejudge.org/external/126/12658.pdf 65 | UVa | 12696 | | 1.4m | Easy | LA 6608 - Phuket 2013; easy problem | - | 0.0 | no | no | https://onlinejudge.org/external/126/12696.pdf 66 | Kattis | batterup | batterup | 1.4m | Easy | easy one loop | 4542 | 1.3 | no | no | https://open.kattis.com/problems/batterup 67 | Kattis | hangingout | hangingout | 1.4m | Easy | simple loop | 2218 | 1.3 | no | no | https://open.kattis.com/problems/hangingout 68 | Kattis | hissingmicrophone | hissingmicrophone | 1.4m | Easy | simple loop | 7690 | 1.3 | no | no | https://open.kattis.com/problems/hissingmicrophone 69 | LeetCode | lc2739 | Total Distance Traveled | 1.4m | Easy | simulate the process | 0 | 2.0 | yes | no | https://leetcode.com/problems/total-distance-traveled/ 70 | Kattis | stopwatch | stopwatch | 1.4m | Easy | linear pass; simulation | 390 | 1.3 | yes | no | https://open.kattis.com/problems/stopwatch 71 | UVa | 11683 | | 1.4n | Still Easy | one linear pass is enough | - | 0.0 | no | no | https://onlinejudge.org/external/116/11683.pdf 72 | UVa | 11786 | | 1.4n | Still Easy | need to observe the pattern | - | 0.0 | no | no | https://onlinejudge.org/external/117/11786.pdf 73 | Kattis | bossbattle | bossbattle | 1.4n | Still Easy | trick question | 1391 | 1.8 | no | no | https://open.kattis.com/problems/bossbattle 74 | LeetCode | lc1342 | Number of Steps to Reduce a Number to Zero | 1.4n | Still Easy | logarithmic steps simulation | 0 | 2.0 | yes | no | https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/ 75 | Kattis | peasoup | peasoup | 1.4n | Still Easy | one linear pass | 771 | 2.4 | no | no | https://open.kattis.com/problems/peasoup 76 | Kattis | thanos | thanos | 1.4n | Still Easy | simple simulation; R is at least 2 | 2503 | 2.5 | no | no | https://open.kattis.com/problems/thanos 77 | Kattis | vote | vote | 1.4n | Still Easy | follow the requirements | 1584 | 2.2 | no | no | https://open.kattis.com/problems/vote 78 | UVa | 12157 | | 1.4o | Medium | LA 4405 - KualaLumpur08; compute and compare the two plans | - | 0.0 | no | no | https://onlinejudge.org/external/121/12157.pdf 79 | UVa | 12643 | | 1.4o | Medium | it has tricky test cases | - | 0.0 | no | no | https://onlinejudge.org/external/126/12643.pdf 80 | Kattis | basicprogramming1 | basicprogramming1 | 1.4o | Medium | a nice summative problem for programming examination of a basic programming methodology course | 201 | 4.0 | no | no | https://open.kattis.com/problems/basicprogramming1 81 | Kattis | battlesimulation | battlesimulation | 1.4o | Medium | one pass; special check on 3! = 6 possible combinations of 3 combo moves | 900 | 2.8 | no | no | https://open.kattis.com/problems/battlesimulation 82 | Kattis | bitsequalizer | bitsequalizer | 1.4o | Medium | analyzing patterns; also available at UVa 12545 - Bits Equalizer | 174 | 4.5 | no | no | https://open.kattis.com/problems/bitsequalizer 83 | LeetCode | lc3522 | Calculate Score After Performing Instructions | 1.4o | Medium | also see Kattis - basicprogramming1 | 0 | 4.0 | yes | no | https://leetcode.com/problems/calculate-score-after-performing-instructions/ 84 | LeetCode | lc0058 | Length of Last Word | 1.5a | 1D Character Array | split and report as asked; programming-skills; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/length-of-last-word/ 85 | UVa | 11278 | | 1.5b | Cipher, Easier | map QWERTY keys to DVORAK | - | 0.0 | no | no | https://onlinejudge.org/external/112/11278.pdf 86 | UVa | 12896 | | 1.5b | Cipher, Easier | simple cipher; use mapper | - | 0.0 | no | no | https://onlinejudge.org/external/128/12896.pdf 87 | UVa | 13145 | | 1.5b | Cipher, Easier | shift alphabet values by +6 characters to read the problem statement; simple Caesar Cipher problem | - | 0.0 | no | no | https://onlinejudge.org/external/131/13145.pdf 88 | Kattis | conundrum | conundrum | 1.5b | Cipher, Easier | simple cipher | 5240 | 1.4 | no | no | https://open.kattis.com/problems/conundrum 89 | Kattis | encodedmessage | encodedmessage | 1.5b | Cipher, Easier | simple 2D grid cipher | 2316 | 1.4 | no | no | https://open.kattis.com/problems/encodedmessage 90 | LeetCode | lc0006 | Zigzag Conversion | 1.5b | Cipher, Easier | index manipulation; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/zigzag-conversion/ 91 | Kattis | t9spelling | t9spelling | 1.5b | Cipher, Easier | similar to (the reverse of) UVa 12896 | 2425 | 1.7 | no | no | https://open.kattis.com/problems/t9spelling 92 | UVa | 00245 | | 1.5c | Cipher, Medium | LA 5184 - WorldFinals Nashville95 | - | 0.0 | no | no | https://onlinejudge.org/external/2/245.pdf 93 | UVa | 11787 | | 1.5c | Cipher, Medium | follow the description | - | 0.0 | no | no | https://onlinejudge.org/external/117/11787.pdf 94 | Kattis | anewalphabet | anewalphabet | 1.5c | Cipher, Medium | simple cipher; 26 characters | 4154 | 1.8 | no | no | https://open.kattis.com/problems/anewalphabet 95 | LeetCode | lc0443 | String Compression | 1.5c | Cipher, Medium | Run-Length Encoding; leetcode-75 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/string-compression/ 96 | Kattis | piglatin | piglatin | 1.5c | Cipher, Medium | simple; check the vowels that include 'y' and process it | 916 | 2.1 | no | no | https://open.kattis.com/problems/piglatin 97 | Kattis | secretmessage | secretmessage | 1.5c | Cipher, Medium | just do as asked; use 2D grid | 2866 | 1.7 | no | no | https://open.kattis.com/problems/secretmessage 98 | Kattis | tajna | tajna | 1.5c | Cipher, Medium | simple 2D grid cipher | 471 | 2.1 | no | no | https://open.kattis.com/problems/tajna 99 | UVa | 01200 | | 1.5d | Input Parsing (Iter) | LA 2972 - Tehran03; tokenize input | - | 0.0 | no | no | https://onlinejudge.org/external/12/1200.pdf 100 | UVa | 10906 | | 1.5d | Input Parsing (Iter) | BNF parsing; iterative solution | - | 0.0 | no | no | https://onlinejudge.org/external/109/10906.pdf 101 | UVa | 11878 | | 1.5d | Input Parsing (Iter) | expression parsing | - | 0.0 | no | no | https://onlinejudge.org/external/118/11878.pdf 102 | Kattis | autori | autori | 1.5d | Input Parsing (Iter) | simple string tokenizer problem | 11602 | 1.2 | no | no | https://open.kattis.com/problems/autori 103 | LeetCode | lc1678 | Goal Parser Interpretation | 1.5d | Input Parsing (Iter) | simple iterative parser | 0 | 2.0 | yes | no | https://leetcode.com/problems/goal-parser-interpretation/ 104 | Kattis | pervasiveheartmonitor | pervasiveheartmonitor | 1.5d | Input Parsing (Iter) | simple parsing; then finding average | 950 | 1.7 | no | no | https://open.kattis.com/problems/pervasiveheartmonitor 105 | Kattis | timebomb | timebomb | 1.5d | Input Parsing (Iter) | just a tedious input parsing problem; divisibility by 6 | 1174 | 1.8 | no | no | https://open.kattis.com/problems/timebomb 106 | UVa | 00488 | | 1.5e | Output Formatting, E | use several loops | - | 0.0 | no | no | https://onlinejudge.org/external/4/488.pdf 107 | UVa | 01605 | | 1.5e | Output Formatting, E | LA 4044 - NortheasternEurope07; we can answer this problem with just h=2 levels | - | 0.0 | no | no | https://onlinejudge.org/external/16/1605.pdf 108 | UVa | 12364 | | 1.5e | Output Formatting, E | 2D array check; check all possible digits [0..9] | - | 0.0 | no | no | https://onlinejudge.org/external/123/12364.pdf 109 | Kattis | display | display | 1.5e | Output Formatting, E | unordered_map; map a digit -> enlarged 7x5 version | 635 | 2.5 | no | no | https://open.kattis.com/problems/display 110 | LeetCode | lc1324 | Print Words Vertically | 1.5e | Output Formatting, E | use 2D grid buffer | 0 | 4.0 | yes | no | https://leetcode.com/problems/print-words-vertically/ 111 | Kattis | musicalnotation | musicalnotation | 1.5e | Output Formatting, E | simple but tedious | 421 | 2.0 | no | no | https://open.kattis.com/problems/musicalnotation 112 | Kattis | skener | skener | 1.5e | Output Formatting, E | enlarging 2D character array | 2067 | 1.5 | no | no | https://open.kattis.com/problems/skener 113 | LeetCode | lc1455 | Check If a Word Occurs As a Prefix of Any Word in a Sentence | 1.5f | Easy, Involving String | tokenize and check | 0 | 2.0 | yes | no | https://leetcode.com/problems/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/ 114 | LeetCode | lc1880 | Check if Word Equals Summation of Two Words | 1.5f | Easy, Involving String | create function toInt(s); compare | 0 | 2.0 | yes | no | https://leetcode.com/problems/check-if-word-equals-summation-of-two-words/ 115 | LeetCode | lc1945 | Sum of Digits of String After Convert | 1.5f | Easy, Involving String | use sum-of-digits function | 0 | 2.0 | yes | no | https://leetcode.com/problems/sum-of-digits-of-string-after-convert/ 116 | Kattis | ptice | ptice | 1.5f | Easy, Involving String | just a simple simulation | 2100 | 1.5 | no | no | https://open.kattis.com/problems/ptice 117 | Kattis | sevenwonders | sevenwonders | 1.5f | Easy, Involving String | one pass | 4776 | 1.4 | no | no | https://open.kattis.com/problems/sevenwonders 118 | Kattis | yinyangstones | yinyangstones | 1.5f | Easy, Involving String | trick question; just check if number of whites equals to number of blacks | 1365 | 1.8 | no | no | https://open.kattis.com/problems/yinyangstones 119 | Kattis | attemptedalphabet | attemptedalphabet | 1.5g | Basic String Matching | just search for all 26 lowercase alphabets | 326 | 1.5 | yes | no | https://open.kattis.com/problems/attemptedalphabet 120 | Kattis | blackthorn | blackthorn | 1.5g | Basic String Matching | simple string search | 702 | 1.3 | yes | no | https://open.kattis.com/problems/blackthorn 121 | Kattis | eclips | eclips | 1.5g | Basic String Matching | tokenize and check existence of 'e' | 287 | 1.4 | yes | no | https://open.kattis.com/problems/eclips 122 | Kattis | gettingwood | gettingwood | 1.5g | Basic String Matching | search for 'tree' | 625 | 1.3 | yes | no | https://open.kattis.com/problems/gettingwood 123 | Kattis | searchwizard | searchwizard | 1.5g | Basic String Matching | multiple basic string matchings | 263 | 1.6 | yes | no | https://open.kattis.com/problems/searchwizard 124 | UVa | 10388 | | 1.6a | Game (Card) | card simulation; uses random number to determine moves; need data structure to maintain the face-up and face-down cards | - | 0.0 | no | no | https://onlinejudge.org/external/103/10388.pdf 125 | UVa | 12247 | | 1.6a | Game (Card) | This is a starred problem; refer to CP3/4 book | - | 0.0 | no | no | https://onlinejudge.org/external/122/12247.pdf 126 | Kattis | bela | bela | 1.6a | Game (Card) | simple card scoring problem | 3731 | 1.3 | no | no | https://open.kattis.com/problems/bela 127 | LeetCode | lc2347 | Best Poker Hand | 1.6a | Game (Card) | apply the poker hand rules as described | 0 | 2.0 | yes | no | https://leetcode.com/problems/best-poker-hand/ 128 | Kattis | memorymatch | memorymatch | 1.6a | Game (Card) | interesting simulation game; many corner cases | 161 | 4.0 | no | no | https://open.kattis.com/problems/memorymatch 129 | Kattis | pokerhand | pokerhand | 1.6a | Game (Card) | frequency count; report max | 2173 | 1.4 | no | no | https://open.kattis.com/problems/pokerhand 130 | Kattis | shuffling | shuffling | 1.6a | Game (Card) | simulate card shuffling operation | 218 | 2.8 | no | no | https://open.kattis.com/problems/shuffling 131 | UVa | 00255 | | 1.6b | Game (Chess) | check the validity of chess moves | - | 0.0 | no | no | https://onlinejudge.org/external/2/255.pdf 132 | UVa | 00278 | | 1.6b | Game (Chess) | basic chess knowledge is needed; derive the closed form formulas | - | 0.0 | no | no | https://onlinejudge.org/external/2/278.pdf 133 | UVa | 00696 | | 1.6b | Game (Chess) | ad hoc; chess | - | 0.0 | no | no | https://onlinejudge.org/external/6/696.pdf 134 | UVa | 10284 | | 1.6b | Game (Chess) | FEN = Forsyth-Edwards Notation is a standard notation for describing board positions in a chess game | - | 0.0 | no | no | https://onlinejudge.org/external/102/10284.pdf 135 | Kattis | 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 | no | no | https://open.kattis.com/problems/chess 136 | Kattis | empleh | empleh | 1.6b | Game (Chess) | the reverse problem of Kattis - helpme | 245 | 1.8 | no | no | https://open.kattis.com/problems/empleh 137 | Kattis | helpme | helpme | 1.6b | Game (Chess) | convert the given chess board into chess notation | 302 | 2.4 | no | no | https://open.kattis.com/problems/helpme 138 | LeetCode | lc0999 | Available Captures for Rook | 1.6b | Game (Chess) | find the (r, c) of rook 'R'; simulate 4 directions of rook attacks | 0 | 2.0 | yes | no | https://leetcode.com/problems/available-captures-for-rook/ 139 | UVa | 00947 | | 1.6c | Game (Others), Easier | similar to UVa 340 | - | 0.0 | no | no | https://onlinejudge.org/external/9/947.pdf 140 | UVa | 10189 | | 1.6c | Game (Others), Easier | simulate the classic Minesweeper game; similar to UVa 10279 | - | 0.0 | no | no | https://onlinejudge.org/external/101/10189.pdf 141 | UVa | 11459 | | 1.6c | Game (Others), Easier | simulate it; similar to UVa 647 | - | 0.0 | no | no | https://onlinejudge.org/external/114/11459.pdf 142 | Kattis | connectthedots | connectthedots | 1.6c | Game (Others), Easier | classic children game; output formatting | 213 | 3.6 | no | no | https://open.kattis.com/problems/connectthedots 143 | Kattis | gamerank | gamerank | 1.6c | Game (Others), Easier | simulate the ranking update process | 732 | 3.9 | no | no | https://open.kattis.com/problems/gamerank 144 | Kattis | guessinggame | guessinggame | 1.6c | Game (Others), Easier | use a 1D flag array; also available at UVa 10530 - Guessing Game | 684 | 2.7 | no | no | https://open.kattis.com/problems/guessinggame 145 | LeetCode | lc3248 | Snake in Matrix | 1.6c | Game (Others), Easier | simulating the movement of snake grid game | 0 | 2.0 | yes | no | https://leetcode.com/problems/snake-in-matrix/ 146 | UVa | 00584 | | 1.6d | Game (Others), Harder | simulation; games; reading comprehension | - | 0.0 | no | no | https://onlinejudge.org/external/5/584.pdf 147 | UVa | 10813 | | 1.6d | Game (Others), Harder | follow the problem description | - | 0.0 | no | no | https://onlinejudge.org/external/108/10813.pdf 148 | Kattis | battleship | battleship | 1.6d | Game (Others), Harder | simulation; reading comprehension; many corner cases | 120 | 5.4 | no | no | https://open.kattis.com/problems/battleship 149 | LeetCode | lc1275 | Find Winner on a Tic Tac Toe Game | 1.6d | Game (Others), Harder | just simulate; programming-skills | 0 | 2.0 | yes | no | https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game/ 150 | Kattis | 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 | no | no | https://open.kattis.com/problems/rockpaperscissors 151 | Kattis | 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 | no | no | https://open.kattis.com/problems/tictactoe2 152 | Kattis | turtlemaster | turtlemaster | 1.6d | Game (Others), Harder | interesting board game to teach programming for children; simulation | 323 | 2.9 | no | no | https://open.kattis.com/problems/turtlemaster 153 | UVa | 00637 | | 1.6e | Real Life, Easier | application in printer driver software | - | 0.0 | no | no | https://onlinejudge.org/external/6/637.pdf 154 | UVa | 13151 | | 1.6e | Real Life, Easier | marking programming exam; ad hoc; straightforward | - | 0.0 | no | no | https://onlinejudge.org/external/131/13151.pdf 155 | Kattis | chopin | chopin | 1.6e | Real Life, Easier | you can learn a bit of music with this problem | 823 | 1.8 | no | no | https://open.kattis.com/problems/chopin 156 | Kattis | compass | compass | 1.6e | Real Life, Easier | your typical smartphone's compass function usually has this small feature | 1529 | 2.0 | no | no | https://open.kattis.com/problems/compass 157 | Kattis | fizzbuzz | fizzbuzz | 1.6e | Real Life, Easier | actually just about easy divisibility properties | 10274 | 1.3 | no | yes | https://open.kattis.com/problems/fizzbuzz 158 | LeetCode | lc0657 | Robot Return to Origin | 1.6e | Real Life, Easier | simple robot movement simulation on a virtual 2D grid; programming-skills | 0 | 2.0 | yes | no | https://leetcode.com/problems/robot-return-to-origin/ 159 | Kattis | trainpassengers | trainpassengers | 1.6e | Real Life, Easier | create a verifier; be careful of corner cases | 1807 | 2.1 | no | no | https://open.kattis.com/problems/trainpassengers 160 | Kattis | wertyu | wertyu | 1.6e | Real Life, Easier | use 2D mapper array to simplify the problem; also available at UVa 10082 - WERTYU | 768 | 2.9 | no | no | https://open.kattis.com/problems/wertyu 161 | UVa | 10528 | | 1.6f | Real Life, Medium | music knowledge in problem description | - | 0.0 | no | no | https://onlinejudge.org/external/105/10528.pdf 162 | UVa | 11736 | | 1.6f | Real Life, Medium | this is a (simplified) introduction to Computer Organization on how computer stores data in memory | - | 0.0 | no | no | https://onlinejudge.org/external/117/11736.pdf 163 | Kattis | beatspread | beatspread | 1.6f | Real Life, Medium | be careful with boundary cases!; also available at UVa 10812 - Beat the Spread | 980 | 2.4 | no | no | https://open.kattis.com/problems/beatspread 164 | LeetCode | lc1041 | Robot Bounded In Circle | 1.6f | Real Life, Medium | virtual 2D grid traversal; simple observations; programming-skills | 0 | 4.0 | yes | no | https://leetcode.com/problems/robot-bounded-in-circle/ 165 | Kattis | luhnchecksum | luhnchecksum | 1.6f | Real Life, Medium | very similar (~95%) to UVa 11743 | 836 | 1.6 | no | no | https://open.kattis.com/problems/luhnchecksum 166 | Kattis | toilet | toilet | 1.6f | Real Life, Medium | simulation; be careful of corner cases | 1756 | 2.4 | no | no | https://open.kattis.com/problems/toilet 167 | Kattis | wordcloud | wordcloud | 1.6f | Real Life, Medium | just a simulation; but be careful of corner cases | 322 | 2.4 | no | no | https://open.kattis.com/problems/wordcloud 168 | UVa | 00706 | | 1.6g | Real Life, Harder | like in old digital display | - | 0.0 | no | no | https://onlinejudge.org/external/7/706.pdf 169 | UVa | 01061 | | 1.6g | Real Life, Harder | LA 3736 - WorldFinals Tokyo07; try all eight possible blood + Rh types with the information given | - | 0.0 | no | no | https://onlinejudge.org/external/10/1061.pdf 170 | UVa | 01091 | | 1.6g | Real Life, Harder | LA 4786 - WorldFinals Harbin10; tedious simulation and reading comprehension | - | 0.0 | no | no | https://onlinejudge.org/external/10/1091.pdf 171 | Kattis | 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 | no | no | https://open.kattis.com/problems/creditcard 172 | LeetCode | lc2299 | Strong Password Checker II | 1.6g | Real Life, Harder | we frequently do this in real-life | 0 | 2.0 | yes | no | https://leetcode.com/problems/strong-password-checker-ii/ 173 | Kattis | tenis | tenis | 1.6g | Real Life, Harder | Tennis scoring rules; tricky test cases; be careful | 78 | 5.0 | no | no | https://open.kattis.com/problems/tenis 174 | UVa | 00579 | | 1.6h | Time, Easier | be careful with corner cases | - | 0.0 | no | no | https://onlinejudge.org/external/5/579.pdf 175 | UVa | 12148 | | 1.6h | Time, Easier | easy with Gregorian Calendar; use method 'add' to add one day to previous date and see if it is the same as the current ... | - | 0.0 | no | no | https://onlinejudge.org/external/121/12148.pdf 176 | Kattis | friday | friday | 1.6h | Time, Easier | the answer depends on the start day of the month | 1059 | 1.9 | no | no | https://open.kattis.com/problems/friday 177 | Kattis | justaminute | justaminute | 1.6h | Time, Easier | linear pass; total seconds/(total minutes*60) | 1512 | 1.7 | no | no | https://open.kattis.com/problems/justaminute 178 | LeetCode | lc1154 | Day of the Year | 1.6h | Time, Easier | use Python datetime library | 0 | 2.0 | yes | no | https://leetcode.com/problems/day-of-the-year/ 179 | Kattis | 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 | no | no | https://open.kattis.com/problems/marswindow 180 | Kattis | 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 | no | no | https://open.kattis.com/problems/savingdaylight 181 | UVa | 11947 | | 1.6i | Time, Harder | easier with Java GregorianCalendar | - | 0.0 | no | no | https://onlinejudge.org/external/119/11947.pdf 182 | UVa | 12822 | | 1.6i | Time, Harder | convert hh:mm:ss to second to simplify the problem; then this is just a tedious simulation problem | - | 0.0 | no | no | https://onlinejudge.org/external/128/12822.pdf 183 | Kattis | bestbefore | bestbefore | 1.6i | Time, Harder | tedious; 3! = 6 possibilities to check | 148 | 4.0 | no | no | https://open.kattis.com/problems/bestbefore 184 | Kattis | birthdayboy | birthdayboy | 1.6i | Time, Harder | convert mm-dd into [0..364]; use DAT; find largest gap via brute force | 108 | 4.6 | no | no | https://open.kattis.com/problems/birthdayboy 185 | Kattis | 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 | no | no | https://open.kattis.com/problems/natrij 186 | Kattis | timezones | timezones | 1.6i | Time, Harder | follow the description, tedious; also available at UVa 10371 - Time Zones | 67 | 5.3 | no | no | https://open.kattis.com/problems/timezones 187 | UVa | 00185 | | 1.6j | Roman Numerals | also involving backtracking | - | 0.0 | no | no | https://onlinejudge.org/external/1/185.pdf 188 | UVa | 00344 | | 1.6j | Roman Numerals | count Roman chars used in [1..N] | - | 0.0 | no | no | https://onlinejudge.org/external/3/344.pdf 189 | UVa | 00759 | | 1.6j | Roman Numerals | validation problem | - | 0.0 | no | no | https://onlinejudge.org/external/7/759.pdf 190 | UVa | 12397 | | 1.6j | Roman Numerals | each Roman digit has a value | - | 0.0 | no | no | https://onlinejudge.org/external/123/12397.pdf 191 | LeetCode | lc0013 | Roman to Integer | 1.6j | Roman Numerals | classic; programming-skills; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/roman-to-integer/ 192 | Kattis | rimski | rimski | 1.6j | Roman Numerals | to Roman/to Decimal conversion problem; use next permutation to be sure | 118 | 4.5 | no | no | https://open.kattis.com/problems/rimski 193 | Kattis | 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 | no | no | https://open.kattis.com/problems/romanholidays 194 | UVa | 11638 | | 1.6k | Time Waster, Easier | simulation; needs to use bitmask for parameter C | - | 0.0 | no | no | https://onlinejudge.org/external/116/11638.pdf 195 | UVa | 12085 | | 1.6k | Time Waster, Easier | LA 2189 - Dhaka06; watch out for PE | - | 0.0 | no | no | https://onlinejudge.org/external/120/12085.pdf 196 | UVa | 12608 | | 1.6k | Time Waster, Easier | simulation with several corner cases | - | 0.0 | no | no | https://onlinejudge.org/external/126/12608.pdf 197 | Kattis | asciiaddition | asciiaddition | 1.6k | Time Waster, Easier | a+b problem in text format | 509 | 1.9 | no | no | https://open.kattis.com/problems/asciiaddition 198 | Kattis | glitchbot | glitchbot | 1.6k | Time Waster, Easier | O(n^2) simulation; only output one answer | 1036 | 2.0 | no | no | https://open.kattis.com/problems/glitchbot 199 | Kattis | pachydermpeanutpacking | pachydermpeanutpacking | 1.6k | Time Waster, Easier | time waster; simple one loop simulation | 322 | 1.9 | no | no | https://open.kattis.com/problems/pachydermpeanutpacking 200 | Kattis | printingcosts | printingcosts | 1.6k | Time Waster, Easier | clear time waster; the hard part is in parsing the costs of each character in the problem description | 705 | 2.2 | no | no | https://open.kattis.com/problems/printingcosts 201 | UVa | 00405 | | 1.6l | Time Waster, Harder | simulation | - | 0.0 | no | no | https://onlinejudge.org/external/4/405.pdf 202 | UVa | 10188 | | 1.6l | Time Waster, Harder | simulation | - | 0.0 | no | no | https://onlinejudge.org/external/101/10188.pdf 203 | UVa | 11717 | | 1.6l | Time Waster, Harder | tricky simulation | - | 0.0 | no | no | https://onlinejudge.org/external/117/11717.pdf 204 | UVa | 12280 | | 1.6l | Time Waster, Harder | a tedious problem | - | 0.0 | no | no | https://onlinejudge.org/external/122/12280.pdf 205 | Kattis | froggie | froggie | 1.6l | Time Waster, Harder | just a simulation; but many corner cases; S can be 0 | 296 | 6.8 | no | no | https://open.kattis.com/problems/froggie 206 | Kattis | functionalfun | functionalfun | 1.6l | Time Waster, Harder | just follow the description; 5 cases; tedious parsing problem; requires a kind of mapper | 487 | 1.9 | no | no | https://open.kattis.com/problems/functionalfun 207 | Kattis | windows | windows | 1.6l | Time Waster, Harder | LA 7162 - WorldFinals Marrakech15; tedious simulation problem; also available at UVa 01721 - Window Manager | 92 | 7.6 | no | no | https://open.kattis.com/problems/windows 208 | UVa | 12150 | | 2.2a | 1D Array, Medium | simple manipulation | - | 0.0 | no | no | https://onlinejudge.org/external/121/12150.pdf 209 | UVa | 12356 | | 2.2a | 1D Array, Medium | similar to deletion in doubly linked lists but we can still use a 1D array for the underlying data structure | - | 0.0 | no | no | https://onlinejudge.org/external/123/12356.pdf 210 | Kattis | downtime | downtime | 2.2a | 1D Array, Medium | 1D array; use Fenwick Tree-like operation for Range Update Point Query | 1068 | 3.2 | no | no | https://open.kattis.com/problems/downtime 211 | Kattis | 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 | yes | no | https://open.kattis.com/problems/fluortanten 212 | Kattis | greedilyincreasing | greedilyincreasing | 2.2a | 1D Array, Medium | just 1D array manipulation; this is not the DP-LIS problem | 1151 | 1.9 | no | no | https://open.kattis.com/problems/greedilyincreasing 213 | Kattis | 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 | no | no | https://open.kattis.com/problems/jollyjumpers 214 | LeetCode | lc0088 | Merge Sorted Array | 2.2a | 1D Array, Medium | do merge of Merge sort; top-interview-150 | 0 | 2.0 | yes | no | https://leetcode.com/problems/merge-sorted-array/ 215 | LeetCode | lc0605 | Can Place Flowers | 2.2a | 1D Array, Medium | tricky 1D array processing; leetcode-75 | 0 | 2.0 | yes | no | https://leetcode.com/problems/can-place-flowers/ 216 | UVa | 10978 | | 2.2c | 1D Array, Harder | 1D string array | - | 0.0 | no | no | https://onlinejudge.org/external/109/10978.pdf 217 | UVa | 12662 | | 2.2c | 1D Array, Harder | 1D array manipulation; brute force | - | 0.0 | no | no | https://onlinejudge.org/external/126/12662.pdf 218 | UVa | 13048 | | 2.2c | 1D Array, Harder | use 1D Boolean array; simulate | - | 0.0 | no | no | https://onlinejudge.org/external/130/13048.pdf 219 | Kattis | divideby100 | divideby100 | 2.2c | 1D Array, Harder | big 1D character array processing; be careful | 557 | 4.2 | no | no | https://open.kattis.com/problems/divideby100 220 | LeetCode | lc0238 | Product of Array Except Self | 2.2c | 1D Array, Harder | use prefix and suffix products; leetcode-75; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/product-of-array-except-self/ 221 | LeetCode | lc1869 | Longer Contiguous Segments of Ones than Zeros | 2.2c | 1D Array, Harder | split s using 0 as delimiter; take token with the max length; do the same but using 1 as delimiter; compare | 0 | 2.0 | yes | no | https://leetcode.com/problems/longer-contiguous-segments-of-ones-than-zeros/ 222 | Kattis | mastermind | mastermind | 2.2c | 1D Array, Harder | 1D array manipulation to count r and s | 446 | 2.4 | no | no | https://open.kattis.com/problems/mastermind 223 | Kattis | pivot | pivot | 2.2c | 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 | no | no | https://open.kattis.com/problems/pivot 224 | UVa | 11581 | | 2.2d | 2D Array, Medium | simulate the process | - | 0.0 | no | no | https://onlinejudge.org/external/115/11581.pdf 225 | UVa | 12667 | | 2.2d | 2D Array, Medium | use both 1D and 2D arrays to store submission status | - | 0.0 | no | no | https://onlinejudge.org/external/126/12667.pdf 226 | Kattis | epigdanceoff | epigdanceoff | 2.2d | 2D Array, Medium | count number of CCs on 2D grid; simpler solution exists: count the number of blank columns plus one | 505 | 1.9 | no | no | https://open.kattis.com/problems/epigdanceoff 227 | Kattis | flowshop | flowshop | 2.2d | 2D Array, Medium | interesting 2D array manipulation | 392 | 2.5 | no | no | https://open.kattis.com/problems/flowshop 228 | Kattis | imageprocessing | imageprocessing | 2.2d | 2D Array, Medium | interesting 2D array manipulation | 344 | 2.1 | no | no | https://open.kattis.com/problems/imageprocessing 229 | LeetCode | lc0027 | Remove Element | 2.2d | 2D Array, Medium | use Partition algorithm (two pointers) for in-place solution; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/remove-element/ 230 | LeetCode | lc1351 | Count Negative Numbers in a Sorted Matrix | 2.2d | 2D Array, Medium | go row by row; right to left, O(m+n) | 0 | 2.0 | yes | yes | https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/ 231 | Kattis | nineknights | nineknights | 2.2d | 2D Array, Medium | 2D array checks; 8 directions | 881 | 1.9 | no | no | https://open.kattis.com/problems/nineknights 232 | UVa | 00466 | | 2.2e | 2D Array, Harder | core functions: rotate and reflect | - | 0.0 | no | no | https://onlinejudge.org/external/4/466.pdf 233 | UVa | 12291 | | 2.2e | 2D Array, Harder | do as asked; a bit tedious | - | 0.0 | no | no | https://onlinejudge.org/external/122/12291.pdf 234 | Kattis | 2048 | 2048 | 2.2e | 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 | no | no | https://open.kattis.com/problems/2048 235 | Kattis | flagquiz | flagquiz | 2.2e | 2D Array, Harder | array of array of strings; be careful; duplicates may exists | 167 | 3.7 | no | no | https://open.kattis.com/problems/flagquiz 236 | Kattis | funhouse | funhouse | 2.2e | 2D Array, Harder | 2D array manipulation; note the direction update | 700 | 2.0 | no | no | https://open.kattis.com/problems/funhouse 237 | LeetCode | lc0054 | Spiral Matrix | 2.2e | 2D Array, Harder | heavy 2D matrix indexing; use dr/dc technique; programming-skills; top-100-liked; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/spiral-matrix/ 238 | Kattis | rings2 | rings2 | 2.2e | 2D Array, Harder | more challenging 2D array manipulation; special output formatting style | 385 | 3.8 | no | no | https://open.kattis.com/problems/rings2 239 | UVa | 10107 | | 2.2f | Sorting, Easier | find median of a growing/dynamic list of integers; we can use multiple calls of nth_element in algorithm | - | 0.0 | no | no | https://onlinejudge.org/external/101/10107.pdf 240 | UVa | 12709 | | 2.2f | Sorting, Easier | LA 6650 - Dhaka13; although the problem has a complicated story; it has a very easy solution with sort routine | - | 0.0 | no | no | https://onlinejudge.org/external/127/12709.pdf 241 | Kattis | basicprogramming2 | basicprogramming2 | 2.2f | Sorting, Easier | a nice problem about basic sorting applications | 189 | 3.4 | no | no | https://open.kattis.com/problems/basicprogramming2 242 | Kattis | height | height | 2.2f | Sorting, Easier | insertion sort simulation | 899 | 2.0 | no | no | https://open.kattis.com/problems/height 243 | LeetCode | lc0217 | Contains Duplicate | 2.2f | Sorting, Easier | sort; check adjacent integers | 0 | 2.0 | yes | yes | https://leetcode.com/problems/contains-duplicate/ 244 | LeetCode | lc1657 | Determine if Two Strings Are Close | 2.2f | Sorting, Easier | check if set of chars and its sorted frequency signatures are the same; leetcode-75 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/determine-if-two-strings-are-close/ 245 | Kattis | mjehuric | mjehuric | 2.2f | Sorting, Easier | a direct simulation of a bubble sort algorithm | 1349 | 1.6 | no | no | https://open.kattis.com/problems/mjehuric 246 | Kattis | sidewayssorting | sidewayssorting | 2.2f | Sorting, Easier | stable_sort or sort multi-fields of columns of a 2D array; ignore case | 857 | 2.0 | no | no | https://open.kattis.com/problems/sidewayssorting 247 | LeetCode | lc0219 | Contains Duplicate II | 2.2g | Sorting, Simple Greedy | sort (keep the original indices as pair (v, i)); check successive elements; top-interview-150 | 0 | 2.0 | yes | no | https://leetcode.com/problems/contains-duplicate-ii/ 248 | LeetCode | lc1502 | Can Make Arithmetic Progression From Sequence | 2.2g | Sorting, Simple Greedy | sort; check gap of successive elements; programming-skills | 0 | 2.0 | yes | yes | https://leetcode.com/problems/can-make-arithmetic-progression-from-sequence/ 249 | LeetCode | lc1637 | Widest Vertical Area Between Two Points Containing No Points | 2.2g | Sorting, Simple Greedy | sort; remove duplicate x-s; check successive elements | 0 | 2.0 | yes | no | https://leetcode.com/problems/widest-vertical-area-between-two-points-containing-no-points/ 250 | LeetCode | lc1984 | Minimum Difference Between Highest and Lowest of K Scores | 2.2g | Sorting, Simple Greedy | sort; check elements that are k indices apart | 0 | 2.0 | yes | no | https://leetcode.com/problems/minimum-difference-between-highest-and-lowest-of-k-scores/ 251 | LeetCode | lc2342 | Max Sum of a Pair With Equal Sum of Digits | 2.2g | Sorting, Simple Greedy | sum-of-digits function; sort by (sod(n), n); check successive elements | 0 | 4.0 | yes | no | https://leetcode.com/problems/max-sum-of-a-pair-with-equal-sum-of-digits/ 252 | LeetCode | lc2465 | Number of Distinct Averages | 2.2g | Sorting, Simple Greedy | sort; two pointers: smallest and largest | 0 | 2.0 | yes | no | https://leetcode.com/problems/number-of-distinct-averages/ 253 | LeetCode | lc2500 | Delete Greatest Value in Each Row | 2.2g | Sorting, Simple Greedy | sort each row; process per column | 0 | 2.0 | yes | no | https://leetcode.com/problems/delete-greatest-value-in-each-row/ 254 | UVa | 01610 | | 2.2h | Sorting, Harder | LA 6196 - MidAtlanticUSA12; median | - | 0.0 | no | no | https://onlinejudge.org/external/16/1610.pdf 255 | UVa | 11321 | | 2.2h | Sorting, Harder | be careful with negative mod! | - | 0.0 | no | no | https://onlinejudge.org/external/113/11321.pdf 256 | Kattis | classy | classy | 2.2h | Sorting, Harder | sort using modified comparison function; a bit of string parsing/tokenization | 1633 | 4.5 | no | no | https://open.kattis.com/problems/classy 257 | Kattis | dyslectionary | dyslectionary | 2.2h | Sorting, Harder | sort the reverse of original string; output formatting | 775 | 3.4 | no | no | https://open.kattis.com/problems/dyslectionary 258 | LeetCode | lc0001 | Two Sum | 2.2h | Sorting, Harder | classic; O(n log n) solution: sort + two pointers; or hashing; top-100-liked; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/two-sum/ 259 | Kattis | musicyourway | musicyourway | 2.2h | Sorting, Harder | stable_sort; custom comparison function | 404 | 2.4 | no | no | https://open.kattis.com/problems/musicyourway 260 | Kattis | sortofsorting | sortofsorting | 2.2h | Sorting, Harder | stable_sort or sort multi-fields | 2667 | 2.2 | no | no | https://open.kattis.com/problems/sortofsorting 261 | UVa | 11462 | | 2.2i | Special Sorting | standard Counting Sort problem | - | 0.0 | no | no | https://onlinejudge.org/external/114/11462.pdf 262 | UVa | 11495 | | 2.2i | Special Sorting | requires O(n log n) merge sort | - | 0.0 | no | no | https://onlinejudge.org/external/114/11495.pdf 263 | UVa | 13212 | | 2.2i | Special Sorting | requires O(n log n) merge sort | - | 0.0 | no | no | https://onlinejudge.org/external/132/13212.pdf 264 | Kattis | bread | bread | 2.2i | Special Sorting | inversion count; hard to derive | 249 | 5.0 | no | no | https://open.kattis.com/problems/bread 265 | LeetCode | lc1122 | Relative Sort Array | 2.2i | Special Sorting | counting sort variant using arr2 order | 0 | 2.0 | yes | no | https://leetcode.com/problems/relative-sort-array/ 266 | Kattis | mali | mali | 2.2i | Special Sorting | Counting Sort two arrays; greedy matching largest+smallest at that point | 97 | 5.1 | no | no | https://open.kattis.com/problems/mali 267 | UVa | 12571 | | 2.2j | Bit Manipulation | precalculate AND operations | - | 0.0 | no | no | https://onlinejudge.org/external/125/12571.pdf 268 | UVa | 12720 | | 2.2j | Bit Manipulation | observe the pattern in this binary to decimal conversion variant; involves modulo arithmetic | - | 0.0 | no | no | https://onlinejudge.org/external/127/12720.pdf 269 | Kattis | bitbybit | bitbybit | 2.2j | Bit Manipulation | be very careful with and + or corner cases | 955 | 2.9 | no | no | https://open.kattis.com/problems/bitbybit 270 | Kattis | deathstar | deathstar | 2.2j | Bit Manipulation | can be solved with bit manipulation | 415 | 2.0 | no | no | https://open.kattis.com/problems/deathstar 271 | LeetCode | lc0338 | Counting Bits | 2.2j | Bit Manipulation | bit_count; trivial; leetcode-75 | 0 | 2.0 | yes | no | https://leetcode.com/problems/counting-bits/ 272 | LeetCode | lc1318 | Minimum Flips to Make a OR b Equal to c | 2.2j | Bit Manipulation | check all 31 bits; a few sub-cases per bit; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c/ 273 | Kattis | snapperhard | snapperhard | 2.2j | Bit Manipulation | bit manipulation; find the pattern; the easier version is also available at Kattis - snappereasy | 501 | 2.3 | no | no | https://open.kattis.com/problems/snapperhard 274 | UVa | 10523 | | 2.2k | Big Integer, Easier | BigInteger addition; multiplication; and power | - | 0.0 | no | no | https://onlinejudge.org/external/105/10523.pdf 275 | UVa | 10925 | | 2.2k | Big Integer, Easier | BigInteger addition and division | - | 0.0 | no | no | https://onlinejudge.org/external/109/10925.pdf 276 | UVa | 11879 | | 2.2k | Big Integer, Easier | BigInteger: mod; divide; subtract; equals | - | 0.0 | no | no | https://onlinejudge.org/external/118/11879.pdf 277 | LeetCode | lc0043 | Multiply Strings | 2.2k | Big Integer, Easier | basic Big Integer multiplication; programming-skills | 0 | 4.0 | yes | no | https://leetcode.com/problems/multiply-strings/ 278 | Kattis | primaryarithmetic | primaryarithmetic | 2.2k | Big Integer, Easier | not a Big Integer problem but a simulation of basic addition | 399 | 2.7 | no | no | https://open.kattis.com/problems/primaryarithmetic 279 | Kattis | simpleaddition | simpleaddition | 2.2k | Big Integer, Easier | that A+B on BigInteger question | 1913 | 1.9 | no | no | https://open.kattis.com/problems/simpleaddition 280 | Kattis | wizardofodds | wizardofodds | 2.2k | Big Integer, Easier | if K is bigger than 350, the answer is clear; else just check if 2^K ≥ N | 488 | 2.6 | no | no | https://open.kattis.com/problems/wizardofodds 281 | LeetCode | lc2259 | Remove Digit From Number to Maximize Result | 2.2l | Big Integer, Harder | we can use Big Integer technique to solve this | 0 | 2.0 | yes | no | https://leetcode.com/problems/remove-digit-from-number-to-maximize-result/ 282 | UVa | 01062 | | 2.2m | Stack | LA 3752 - WorldFinals Tokyo07; simulation with stack; maximum answer is 26 stacks; O(n) solution exists | - | 0.0 | no | no | https://onlinejudge.org/external/10/1062.pdf 283 | UVa | 13055 | | 2.2m | Stack | nice problem about stack | - | 0.0 | no | no | https://onlinejudge.org/external/130/13055.pdf 284 | Kattis | evenup | evenup | 2.2m | Stack | use stack to solve this problem | 1273 | 2.7 | no | yes | https://open.kattis.com/problems/evenup 285 | LeetCode | lc0394 | Decode String | 2.2m | Stack | stack simulation; leetcode-75; top-100-liked | 0 | 4.0 | yes | no | https://leetcode.com/problems/decode-string/ 286 | Kattis | pairingsocks | pairingsocks | 2.2m | Stack | simulation using two stacks; just do as asked | 556 | 3.0 | no | yes | https://open.kattis.com/problems/pairingsocks 287 | Kattis | restaurant | restaurant | 2.2m | 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 | no | no | https://open.kattis.com/problems/restaurant 288 | Kattis | throwns | throwns | 2.2m | Stack | use stack of egg positions to help with the undo operation; be careful of corner cases involving modulo operation | 1091 | 2.6 | no | no | https://open.kattis.com/problems/throwns 289 | UVa | 00551 | | 2.2n | Stack-based Problems | bracket matching; use stack | - | 0.0 | no | no | https://onlinejudge.org/external/5/551.pdf 290 | UVa | 00727 | | 2.2n | Stack-based Problems | Infix to Postfix conversion problem | - | 0.0 | no | no | https://onlinejudge.org/external/7/727.pdf 291 | UVa | 11111 | | 2.2n | Stack-based Problems | bracket matching with twists | - | 0.0 | no | no | https://onlinejudge.org/external/111/11111.pdf 292 | Kattis | bungeebuilder | bungeebuilder | 2.2n | Stack-based Problems | clever usage of stack; linear pass; bracket (mountain) matching variant | 83 | 3.3 | no | no | https://open.kattis.com/problems/bungeebuilder 293 | Kattis | circuitmath | circuitmath | 2.2n | Stack-based Problems | postfix calculator problem | 918 | 2.4 | no | no | https://open.kattis.com/problems/circuitmath 294 | Kattis | delimitersoup | delimitersoup | 2.2n | Stack-based Problems | bracket matching; stack | 382 | 1.9 | no | no | https://open.kattis.com/problems/delimitersoup 295 | LeetCode | lc0901 | Online Stock Span | 2.2n | Stack-based Problems | process left-to-right (each day); monotonic non-increasing stack (price, days_increasing); leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/online-stock-span/ 296 | UVa | 11988 | | 2.2o | List/Queue/Deque | rare linked list problem | - | 0.0 | no | no | https://onlinejudge.org/external/119/11988.pdf 297 | UVa | 12108 | | 2.2o | List/Queue/Deque | simulation with N queues | - | 0.0 | no | no | https://onlinejudge.org/external/121/12108.pdf 298 | Kattis | integerlists | integerlists | 2.2o | 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 | no | no | https://open.kattis.com/problems/integerlists 299 | Kattis | joinstrings | joinstrings | 2.2o | List/Queue/Deque | all '+' operations must be O(1) | 959 | 4.1 | no | no | https://open.kattis.com/problems/joinstrings 300 | LeetCode | lc0232 | Implement Queue using Stacks | 2.2o | List/Queue/Deque | the interesting implementation of queue with two stacks: in-stack and out-stack | 0 | 2.0 | yes | yes | https://leetcode.com/problems/implement-queue-using-stacks/ 301 | Kattis | sim | sim | 2.2o | List/Queue/Deque | use list and its iterator | 99 | 2.0 | no | no | https://open.kattis.com/problems/sim 302 | Kattis | teque | teque | 2.2o | List/Queue/Deque | all operations must be O(1) | 766 | 3.3 | no | no | https://open.kattis.com/problems/teque 303 | LeetCode | lc0011 | Container With Most Water | 2.2p | 1D Array, Two Pointers | two pointers, l=0, r=n-1; we can always move the shorter pointer inside; leetcode-75; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/container-with-most-water/ 304 | LeetCode | lc0167 | Two Sum II - Input Array Is Sorted | 2.2p | 1D Array, Two Pointers | two pointers: leftmost and rightmost; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ 305 | LeetCode | lc0283 | Move Zeroes | 2.2p | 1D Array, Two Pointers | two pointers: leftmost zero and cur; programming-skills; leetcode-75; top-100-liked | 0 | 2.0 | yes | yes | https://leetcode.com/problems/move-zeroes/ 306 | LeetCode | lc0392 | Is Subsequence | 2.2p | 1D Array, Two Pointers | variant of merge of Merge sort; leetcode-75; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/is-subsequence/ 307 | LeetCode | lc1768 | Merge Strings Alternately | 2.2p | 1D Array, Two Pointers | variant of merge of Merge sort; programming-skills; leetcode-75 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/merge-strings-alternately/ 308 | UVa | 00261 | | 2.2q | Sliding Window | sliding window variant | - | 0.0 | no | no | https://onlinejudge.org/external/2/261.pdf 309 | UVa | 01121 | | 2.2q | Sliding Window | LA 2678 - SouthEasternEurope06; sliding window variant | - | 0.0 | no | no | https://onlinejudge.org/external/11/1121.pdf 310 | UVa | 11536 | | 2.2q | Sliding Window | sliding window variant | - | 0.0 | no | no | https://onlinejudge.org/external/115/11536.pdf 311 | LeetCode | lc0003 | Longest Substring Without Repeating Characters | 2.2q | Sliding Window | increase char freq when extending; reduce window size if duplicate is seen; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/longest-substring-without-repeating-characters/ 312 | LeetCode | lc0643 | Maximum Average Subarray I | 2.2q | Sliding Window | slide the window of size k; keep the max; divide by k; leetcode-75 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/maximum-average-subarray-i/ 313 | Kattis | sound | sound | 2.2q | Sliding Window | sliding window variant 4; max and min; similar to Kattis - treeshopping | 104 | 5.3 | no | no | https://open.kattis.com/problems/sound 314 | Kattis | subseqhard | subseqhard | 2.2q | Sliding Window | interesting sliding window variant | 1119 | 3.9 | no | no | https://open.kattis.com/problems/subseqhard 315 | LeetCode | lc0002 | Add Two Numbers | 2.2r | Linked List Exercises | simple problem but in reverse SLL mode; programming-skills; top-100-liked; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/add-two-numbers/ 316 | LeetCode | lc0021 | Merge Two Sorted Lists | 2.2r | Linked List Exercises | merge of merge sort in linked list way; programming-skills; top-100-liked; top-interview-150 | 0 | 2.0 | yes | no | https://leetcode.com/problems/merge-two-sorted-lists/ 317 | LeetCode | lc0206 | Reverse Linked List | 2.2r | Linked List Exercises | classic SLL reversal task; programming-skills; leetcode-75; top-100-liked | 0 | 2.0 | yes | yes | https://leetcode.com/problems/reverse-linked-list/ 318 | LeetCode | lc0445 | Add Two Numbers II | 2.2r | Linked List Exercises | like LC0002; but need to use two stacks; programming-skills | 0 | 4.0 | yes | no | https://leetcode.com/problems/add-two-numbers-ii/ 319 | LeetCode | lc2095 | Delete the Middle Node of a Linked List | 2.2r | Linked List Exercises | first pass to count n; second pass to go to the middle vertex and to skip it; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/ 320 | LeetCode | lc2130 | Maximum Twin Sum of a Linked List | 2.2r | Linked List Exercises | use recursion; as it unwinds, sum the values of leftmost and rightmost pointers; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/ 321 | UVa | 01203 | | 2.3a | Priority Queue | LA 3135 - Beijing04; use priority_queue | - | 0.0 | no | no | https://onlinejudge.org/external/12/1203.pdf 322 | UVa | 11997 | | 2.3a | Priority Queue | sort the lists; merge two sorted lists using priority_queue to keep the K-th smallest sum every time | - | 0.0 | no | no | https://onlinejudge.org/external/119/11997.pdf 323 | Kattis | jugglingpatterns | jugglingpatterns | 2.3a | Priority Queue | PQ simulation; reading comprehension | 48 | 6.3 | no | no | https://open.kattis.com/problems/jugglingpatterns 324 | Kattis | knigsoftheforest | knigsoftheforest | 2.3a | Priority Queue | PQ simulation after sorting the entries by year | 184 | 3.6 | no | no | https://open.kattis.com/problems/knigsoftheforest 325 | LeetCode | lc2462 | Total Cost to Hire K Workers | 2.3a | Priority Queue | min PQ simulation; two pointers: i=0 and j=n-1; move inwards; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/total-cost-to-hire-k-workers/ 326 | Kattis | 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 | no | no | https://open.kattis.com/problems/numbertree 327 | Kattis | stockprices | stockprices | 2.3a | Priority Queue | PQ simulation; both max and min PQ | 109 | 3.7 | no | no | https://open.kattis.com/problems/stockprices 328 | UVa | 00499 | | 2.3b | DAT, ASCII | ASCII keys | - | 0.0 | no | no | https://onlinejudge.org/external/4/499.pdf 329 | UVa | 11340 | | 2.3b | DAT, ASCII | ASCII keys | - | 0.0 | no | yes | https://onlinejudge.org/external/113/11340.pdf 330 | UVa | 11577 | | 2.3b | DAT, ASCII | A-Z keys | - | 0.0 | no | no | https://onlinejudge.org/external/115/11577.pdf 331 | Kattis | alphabetspam | alphabetspam | 2.3b | DAT, ASCII | count the frequencies of lowercase, uppercase, and whitespace characters | 3902 | 1.4 | no | no | https://open.kattis.com/problems/alphabetspam 332 | LeetCode | lc0389 | Find the Difference | 2.3b | DAT, ASCII | DAT ('a'..'z'); programming-skills | 0 | 2.0 | yes | no | https://leetcode.com/problems/find-the-difference/ 333 | Kattis | quickbrownfox | quickbrownfox | 2.3b | DAT, ASCII | pangram; frequency counting of 26 alphabets | 4433 | 1.6 | no | no | https://open.kattis.com/problems/quickbrownfox 334 | Kattis | soundex | soundex | 2.3b | DAT, ASCII | DAT for soundex A-Z code mapping; also available at UVa 10260 - Soundex | 106 | 2.9 | yes | no | https://open.kattis.com/problems/soundex 335 | UVa | 01368 | | 2.3c | DAT, Others | for each column j, find the highest frequency character among all j-th column of all m DNA strings | - | 0.0 | no | no | https://onlinejudge.org/external/13/1368.pdf 336 | UVa | 11203 | | 2.3c | DAT, Others | count frequency of x/y/z | - | 0.0 | no | no | https://onlinejudge.org/external/112/11203.pdf 337 | Kattis | bookingaroom | bookingaroom | 2.3c | DAT, Others | only 100 rooms; use 1D Boolean array | 2849 | 1.7 | no | no | https://open.kattis.com/problems/bookingaroom 338 | Kattis | busnumbers | busnumbers | 2.3c | DAT, Others | only 1000 bus numbers; use 1D Boolean array | 2776 | 2.4 | no | no | https://open.kattis.com/problems/busnumbers 339 | Kattis | freefood | freefood | 2.3c | DAT, Others | only 365 days in a year | 1965 | 1.5 | no | no | https://open.kattis.com/problems/freefood 340 | LeetCode | lc0645 | Set Mismatch | 2.3c | DAT, Others | DAT [1..10000]; find key with freq 2 (repeated) and 0 (missing) | 0 | 2.0 | yes | yes | https://leetcode.com/problems/set-mismatch/ 341 | Kattis | princesspeach | princesspeach | 2.3c | DAT, Others | DAT; linear pass | 839 | 2.1 | no | yes | https://open.kattis.com/problems/princesspeach 342 | UVa | 12049 | | 2.3d | Hash Table (set), E | unordered_multiset manipulation | - | 0.0 | no | no | https://onlinejudge.org/external/120/12049.pdf 343 | UVa | 13148 | | 2.3d | Hash Table (set), E | we can store all precomputed answers - which are given - into unordered_set | - | 0.0 | no | no | https://onlinejudge.org/external/131/13148.pdf 344 | Kattis | cd | cd | 2.3d | Hash Table (set), E | 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 | no | no | https://open.kattis.com/problems/cd 345 | Kattis | esej | esej | 2.3d | Hash Table (set), E | use unordered_set to prevent duplicate | 509 | 3.3 | no | no | https://open.kattis.com/problems/esej 346 | LeetCode | lc2215 | Find the Difference of Two Arrays | 2.3d | Hash Table (set), E | use set for fast tests; leetcode-75 | 0 | 2.0 | yes | no | https://leetcode.com/problems/find-the-difference-of-two-arrays/ 347 | Kattis | shiritori | shiritori | 2.3d | Hash Table (set), E | linear pass; use unordered_set to keep track of words that have been called | 295 | 2.9 | no | no | https://open.kattis.com/problems/shiritori 348 | Kattis | greetingcard | greetingcard | 2.3e | Hash Table (set), H | use unordered_set; only 12 neighbors | 607 | 4.9 | no | no | https://open.kattis.com/problems/greetingcard 349 | UVa | 11348 | | 2.3f | Hash Table (map), E | use map and set to check uniqueness | - | 0.0 | no | no | https://onlinejudge.org/external/113/11348.pdf 350 | UVa | 11629 | | 2.3f | Hash Table (map), E | use map | - | 0.0 | no | no | https://onlinejudge.org/external/116/11629.pdf 351 | Kattis | competitivearcadebasketball | competitivearcadebasketball | 2.3f | Hash Table (map), E | use unordered_map | 209 | 2.8 | no | no | https://open.kattis.com/problems/competitivearcadebasketball 352 | Kattis | conformity | conformity | 2.3f | 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 | no | no | https://open.kattis.com/problems/conformity 353 | Kattis | grandpabernie | grandpabernie | 2.3f | Hash Table (map), E | use unordered_map plus (sorted) vector | 1065 | 3.2 | no | no | https://open.kattis.com/problems/grandpabernie 354 | LeetCode | lc1679 | Max Number of K-Sum Pairs | 2.3f | Hash Table (map), E | frequency Counter; pairings; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/max-number-of-k-sum-pairs/ 355 | Kattis | recount | recount | 2.3f | Hash Table (map), E | use map; frequency counting | 1163 | 2.0 | no | yes | https://open.kattis.com/problems/recount 356 | LeetCode | lc0347 | Top K Frequent Elements | 2.3g | Hash Table (Counter) | use Counter to count frequency; sort by frequencies; top k; top-100-liked | 0 | 4.0 | yes | yes | https://leetcode.com/problems/top-k-frequent-elements/ 357 | UVa | 10145 | | 2.3h | Hash Table (map), H | use map and set | - | 0.0 | no | no | https://onlinejudge.org/external/101/10145.pdf 358 | UVa | 11860 | | 2.3h | Hash Table (map), H | use set and map; linear scan | - | 0.0 | no | no | https://onlinejudge.org/external/118/11860.pdf 359 | Kattis | addingwords | addingwords | 2.3h | Hash Table (map), H | use unordered_map | 1880 | 3.9 | no | no | https://open.kattis.com/problems/addingwords 360 | Kattis | awkwardparty | awkwardparty | 2.3h | Hash Table (map), H | use unordered_map to running max and running min; report the largest difference | 611 | 3.0 | no | no | https://open.kattis.com/problems/awkwardparty 361 | Kattis | basicinterpreter | basicinterpreter | 2.3h | Hash Table (map), H | the harder version of Kattis - variablearithmetic; tedious; be careful; print string inside double quotes verbatim | 152 | 6.7 | no | no | https://open.kattis.com/problems/basicinterpreter 362 | UVa | 10815 | | 2.3i | Balanced BST (set) | use set and string | - | 0.0 | no | no | https://onlinejudge.org/external/108/10815.pdf 363 | UVa | 11136 | | 2.3i | Balanced BST (set) | use multiset | - | 0.0 | no | no | https://onlinejudge.org/external/111/11136.pdf 364 | UVa | 13037 | | 2.3i | Balanced BST (set) | we can use set or a sorted array | - | 0.0 | no | no | https://onlinejudge.org/external/130/13037.pdf 365 | Kattis | bst | bst | 2.3i | Balanced BST (set) | simulate special BST [1..N] insertions using set | 449 | 7.3 | no | no | https://open.kattis.com/problems/bst 366 | Kattis | candydivision | candydivision | 2.3i | 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 | no | no | https://open.kattis.com/problems/candydivision 367 | Kattis | compoundwords | compoundwords | 2.3i | Balanced BST (set) | use set extensively; iterator | 1807 | 1.7 | no | no | https://open.kattis.com/problems/compoundwords 368 | LeetCode | lc0056 | Merge Intervals | 2.3i | Balanced BST (set) | maintain set of intervals using bBST (set); do quick merging of intervals; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/merge-intervals/ 369 | UVa | 10138 | | 2.3j | Balanced BST (map) | map plates to bills; entrance time; and position | - | 0.0 | no | no | https://onlinejudge.org/external/101/10138.pdf 370 | UVa | 11308 | | 2.3j | Balanced BST (map) | use map and set | - | 0.0 | no | no | https://onlinejudge.org/external/113/11308.pdf 371 | UVa | 12504 | | 2.3j | Balanced BST (map) | use map; string to string | - | 0.0 | no | no | https://onlinejudge.org/external/125/12504.pdf 372 | Kattis | administrativeproblems | administrativeproblems | 2.3j | Balanced BST (map) | use several maps as the output (of spy names) has to be sorted; be careful of corner cases | 194 | 6.3 | no | no | https://open.kattis.com/problems/administrativeproblems 373 | Kattis | doctorkattis | doctorkattis | 2.3j | Balanced BST (map) | Max Priority Queue with frequent (increaseKey) updates; use map | 114 | 4.7 | no | no | https://open.kattis.com/problems/doctorkattis 374 | Kattis | kattissquest | kattissquest | 2.3j | Balanced BST (map) | use map of priority queues; other solutions exist | 834 | 3.1 | no | no | https://open.kattis.com/problems/kattissquest 375 | Kattis | srednji | srednji | 2.3j | Balanced BST (map) | go left and right of B; use fast data structure like map to help determine the result fast | 164 | 4.1 | no | no | https://open.kattis.com/problems/srednji 376 | UVa | 10909 | | 2.3k | Order Statistics Tree | involves dynamic selection; use pb\_ds, Fenwick Tree, or augment balanced BST | - | 0.0 | no | no | https://onlinejudge.org/external/109/10909.pdf 377 | Kattis | babynames | babynames | 2.3k | Order Statistics Tree | dynamic rank problem; use two pb_ds | 87 | 5.5 | no | no | https://open.kattis.com/problems/babynames 378 | Kattis | continuousmedian | continuousmedian | 2.3k | Order Statistics Tree | dynamic selection problem; specifically the median values; pb_ds helps | 140 | 3.9 | no | yes | https://open.kattis.com/problems/continuousmedian 379 | Kattis | cookieselection | cookieselection | 2.3k | 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 | no | no | https://open.kattis.com/problems/cookieselection 380 | Kattis | gcpc | gcpc | 2.3k | Order Statistics Tree | dynamic rank problem; pb_ds helps | 876 | 5.3 | no | no | https://open.kattis.com/problems/gcpc 381 | LeetCode | lc0100 | Same Tree | 2.3l | BT Exercises, E | recursive check; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/same-tree/ 382 | LeetCode | lc0104 | Maximum Depth of Binary Tree | 2.3l | BT Exercises, E | recursive height check; leetcode-75; top-100-liked; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/maximum-depth-of-binary-tree/ 383 | LeetCode | lc0236 | Lowest Common Ancestor of a Binary Tree | 2.3l | BT Exercises, E | find the first vertex using postorder where both p and q are seen; leetcode-75; top-100-liked; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/ 384 | LeetCode | lc0437 | Path Sum III | 2.3l | BT Exercises, E | for each vertex, run preorder traversal; check if the path sum equals to target; leetcode-75; top-100-liked | 0 | 4.0 | yes | no | https://leetcode.com/problems/path-sum-iii/ 385 | LeetCode | lc0872 | Leaf-Similar Trees | 2.3l | BT Exercises, E | run inorder traversals on both trees; picking only the leaves; compare them; leetcode-75 | 0 | 2.0 | yes | no | https://leetcode.com/problems/leaf-similar-trees/ 386 | LeetCode | lc1372 | Longest ZigZag Path in a Binary Tree | 2.3l | BT Exercises, E | modified preorder traversal; reset counter if same direction; add counter if zig-zag-ing; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/longest-zigzag-path-in-a-binary-tree/ 387 | LeetCode | lc1448 | Count Good Nodes in Binary Tree | 2.3l | BT Exercises, E | modified preorder traversal; keep the largest along the way; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/count-good-nodes-in-binary-tree/ 388 | LeetCode | lc0098 | Validate Binary Search Tree | 2.3n | BST Exercises | recursive BST property validator; top-100-liked; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/validate-binary-search-tree/ 389 | LeetCode | lc0230 | Kth Smallest Element in a BST | 2.3n | BST Exercises | inorder traversal; report the k-th element; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/kth-smallest-element-in-a-bst/ 390 | LeetCode | lc0450 | Delete Node in a BST | 2.3n | BST Exercises | code BST deletion sub-cases; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/delete-node-in-a-bst/ 391 | LeetCode | lc0530 | Minimum Absolute Difference in BST | 2.3n | BST Exercises | the min gap is between successive elements during inorder traversal; same as LC 0783; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/minimum-absolute-difference-in-bst/ 392 | LeetCode | lc0700 | Search in a Binary Search Tree | 2.3n | BST Exercises | the classic BST search process; leetcode-75 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/search-in-a-binary-search-tree/ 393 | LeetCode | lc0897 | Increasing Order Search Tree | 2.3n | BST Exercises | create new skewed BST using inorder traversal of original BST | 0 | 2.0 | yes | no | https://leetcode.com/problems/increasing-order-search-tree/ 394 | LeetCode | lc0938 | Range Sum of BST | 2.3n | BST Exercises | customize inorder traversal of BST | 0 | 2.0 | yes | yes | https://leetcode.com/problems/range-sum-of-bst/ 395 | UVa | 00599 | | 2.4a | Graph Data Structures | V-E = number of CCs; use a bitset of size 26 to count the number of vertices that have some edge | - | 0.0 | no | no | https://onlinejudge.org/external/5/599.pdf 396 | UVa | 11550 | | 2.4a | Graph Data Structures | graph representation; incidence matrix | - | 0.0 | no | no | https://onlinejudge.org/external/115/11550.pdf 397 | UVa | 11991 | | 2.4a | Graph Data Structures | Adjacency List | - | 0.0 | no | yes | https://onlinejudge.org/external/119/11991.pdf 398 | Kattis | 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 | no | no | https://open.kattis.com/problems/abinitio 399 | Kattis | chopwood | chopwood | 2.4a | Graph Data Structures | Prüfer sequence; use priority_queue | 258 | 3.5 | no | no | https://open.kattis.com/problems/chopwood 400 | Kattis | 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 | no | no | https://open.kattis.com/problems/traveltheskies 401 | UVa | 01197 | | 2.4b | Union-Find | LA 2817 - Kaohsiung03; Connected Components | - | 0.0 | no | no | https://onlinejudge.org/external/11/1197.pdf 402 | UVa | 01329 | | 2.4b | Union-Find | LA 3027 - SouthEasternEurope04; interesting UFDS variant; modify the union and find routine | - | 0.0 | no | no | https://onlinejudge.org/external/13/1329.pdf 403 | UVa | 10608 | | 2.4b | Union-Find | find the set with the largest element | - | 0.0 | no | no | https://onlinejudge.org/external/106/10608.pdf 404 | UVa | 10685 | | 2.4b | Union-Find | find the set with the largest element | - | 0.0 | no | no | https://onlinejudge.org/external/106/10685.pdf 405 | Kattis | 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 | no | no | https://open.kattis.com/problems/almostunionfind 406 | Kattis | control | control | 2.4b | Union-Find | LA 7480 - Singapore15; simulation of UFDS; size of set; number of disjoint sets | 424 | 4.6 | no | no | https://open.kattis.com/problems/control 407 | Kattis | ladice | ladice | 2.4b | Union-Find | size of set; decrement one per usage | 615 | 2.8 | no | no | https://open.kattis.com/problems/ladice 408 | Kattis | unionfind | unionfind | 2.4b | Union-Find | basic UFDS; similar to UVa 00793 | 1086 | 4.8 | no | yes | https://open.kattis.com/problems/unionfind 409 | UVa | 11402 | | 2.4c | Tree-related DS | Segment Tree with lazy updates | - | 0.0 | no | no | https://onlinejudge.org/external/114/11402.pdf 410 | UVa | 11423 | | 2.4c | Tree-related DS | clever usage of Fenwick Tree and large array; important hint: look at the constraints carefully | - | 0.0 | no | no | https://onlinejudge.org/external/114/11423.pdf 411 | UVa | 12299 | | 2.4c | Tree-related DS | Segment Tree with a few point (not range) updates; RMQs | - | 0.0 | no | no | https://onlinejudge.org/external/122/12299.pdf 412 | Kattis | fenwick | fenwick | 2.4c | Tree-related DS | basic Fenwick Tree; use long long | 695 | 4.5 | no | no | https://open.kattis.com/problems/fenwick 413 | Kattis | justforsidekicks | justforsidekicks | 2.4c | Tree-related DS | use six Fenwick Trees, one for each gem type | 359 | 3.8 | no | no | https://open.kattis.com/problems/justforsidekicks 414 | Kattis | 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 | no | no | https://open.kattis.com/problems/moviecollection 415 | Kattis | supercomputer | supercomputer | 2.4c | Tree-related DS | easy problem if we use Fenwick Tree | 760 | 3.8 | no | no | https://open.kattis.com/problems/supercomputer 416 | UVa | 00750 | | 3.2a | Pre-calculate-able | classic backtracking problem; only 92 possible 8-queens positions | - | 0.0 | no | no | https://onlinejudge.org/external/7/750.pdf 417 | UVa | 10128 | | 3.2a | Pre-calculate-able | backtracking with pruning; try all $N!$ permutations that satisfy the requirement; 13! will TLE; pre-calculate the resul... | - | 0.0 | no | no | https://onlinejudge.org/external/101/10128.pdf 418 | UVa | 10276 | | 3.2a | Pre-calculate-able | insert a number one by one | - | 0.0 | no | no | https://onlinejudge.org/external/102/10276.pdf 419 | Kattis | 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 | no | no | https://open.kattis.com/problems/cardtrick2 420 | Kattis | foolingaround | foolingaround | 3.2a | Pre-calculate-able | there are only 379 different values of N where Bob wins; pre-calculateable | 117 | 5.8 | no | no | https://open.kattis.com/problems/foolingaround 421 | LeetCode | lc0052 | N-Queens II | 3.2a | Pre-calculate-able | pre-calculate answers for n = 1 to 9; top-interview-150 | 0 | 6.0 | yes | no | https://leetcode.com/problems/n-queens-ii/ 422 | Kattis | 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 | no | no | https://open.kattis.com/problems/sgcoin 423 | UVa | 12488 | | 3.2b | Iterative (Two Loops), E | 2 nested loops; simulate overtaking process | - | 0.0 | no | no | https://onlinejudge.org/external/124/12488.pdf 424 | Kattis | blackfriday | blackfriday | 3.2b | Iterative (Two Loops), E | 2D nested loops; frequency counting | 2384 | 2.2 | no | no | https://open.kattis.com/problems/blackfriday 425 | Kattis | closestsums | closestsums | 3.2b | Iterative (Two Loops), E | sort and then do O(n^2) pairings; also available at UVa 10487 - Closest Sums | 1105 | 2.9 | no | no | https://open.kattis.com/problems/closestsums 426 | Kattis | golombrulers | golombrulers | 3.2b | Iterative (Two Loops), E | 2D nested loops; additional 1D loops for checking | 297 | 3.2 | no | no | https://open.kattis.com/problems/golombrulers 427 | LeetCode | lc3184 | Count Pairs That Form a Complete Day I | 3.2b | Iterative (Two Loops), E | 2 nested loops | 0 | 2.0 | yes | yes | https://leetcode.com/problems/count-pairs-that-form-a-complete-day-i/ 428 | UVa | 01588 | | 3.2c | Iterative (Two Loops), H | LA 3712 - NorthEasternEurope06; good iterative brute force problem; beware of corner cases | - | 0.0 | no | no | https://onlinejudge.org/external/15/1588.pdf 429 | UVa | 00441 | | 3.2d | Three+ Nested Loops, E | 6 nested loops; easy | - | 0.0 | no | yes | https://onlinejudge.org/external/4/441.pdf 430 | UVa | 12515 | | 3.2d | Three+ Nested Loops, E | 3 nested loops | - | 0.0 | no | no | https://onlinejudge.org/external/125/12515.pdf 431 | UVa | 12844 | | 3.2d | Three+ Nested Loops, E | 5 nested loops; scaled down version of UVa 10202; do observations first | - | 0.0 | no | no | https://onlinejudge.org/external/128/12844.pdf 432 | Kattis | cudoviste | cudoviste | 3.2d | 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 | no | no | https://open.kattis.com/problems/cudoviste 433 | LeetCode | lc1790 | Check if One String Swap Can Make Strings Equal | 3.2d | Three+ Nested Loops, E | 3 nested loops | 0 | 2.0 | yes | no | https://leetcode.com/problems/check-if-one-string-swap-can-make-strings-equal/ 434 | Kattis | npuzzle | npuzzle | 3.2d | Three+ Nested Loops, E | 4 nested loops; easy | 683 | 2.2 | no | no | https://open.kattis.com/problems/npuzzle 435 | Kattis | set | set | 3.2d | Three+ Nested Loops, E | 4 nested loops; easy | 364 | 1.8 | no | no | https://open.kattis.com/problems/set 436 | UVa | 00386 | | 3.2e | Three+ Nested Loops, H | 4 nested loops with pruning | - | 0.0 | no | no | https://onlinejudge.org/external/3/386.pdf 437 | UVa | 10660 | | 3.2e | Three+ Nested Loops, H | 7 nested loops; Manhattan distance | - | 0.0 | no | no | https://onlinejudge.org/external/106/10660.pdf 438 | UVa | 11804 | | 3.2e | Three+ Nested Loops, H | 5 nested loops | - | 0.0 | no | no | https://onlinejudge.org/external/118/11804.pdf 439 | Kattis | calculatingdartscores | calculatingdartscores | 3.2e | Three+ Nested Loops, H | 6 nested loops but easy; see if a*i +b*j + c*k == n | 752 | 2.8 | no | no | https://open.kattis.com/problems/calculatingdartscores 440 | LeetCode | lc2352 | Equal Row and Column Pairs | 3.2e | Three+ Nested Loops, H | 3 nested loops solution is still acceptable; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/equal-row-and-column-pairs/ 441 | Kattis | lektira | lektira | 3.2e | 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 | no | no | https://open.kattis.com/problems/lektira 442 | Kattis | tautology | tautology | 3.2e | Three+ Nested Loops, H | try all 2^5 = 32 values with pruning; also available at UVa 11108 - Tautology | 160 | 3.4 | no | no | https://open.kattis.com/problems/tautology 443 | UVa | 00234 | | 3.2f | Iterative (Permutation) | LA 5173 - WorldFinals Phoenix94; use next_permutation; simulation | - | 0.0 | no | no | https://onlinejudge.org/external/2/234.pdf 444 | UVa | 01064 | | 3.2f | Iterative (Permutation) | LA 3808 - WorldFinals Tokyo07; permutation of up to 5 messages; simulation; mind the word 'consecutive' | - | 0.0 | no | no | https://onlinejudge.org/external/10/1064.pdf 445 | UVa | 11742 | | 3.2f | Iterative (Permutation) | try all permutations | - | 0.0 | no | no | https://onlinejudge.org/external/117/11742.pdf 446 | Kattis | dancerecital | dancerecital | 3.2f | Iterative (Permutation) | try all R! permutations; compare adjacent routines | 274 | 4.2 | no | no | https://open.kattis.com/problems/dancerecital 447 | Kattis | dreamer | dreamer | 3.2f | Iterative (Permutation) | try all 8! permutations of digits; check if the date is valid; output earliest valid date | 406 | 2.0 | no | no | https://open.kattis.com/problems/dreamer 448 | LeetCode | lc0046 | Permutations | 3.2f | Iterative (Permutation) | C++ next_permutation from sorted to reverse-sorted permutations; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/permutations/ 449 | Kattis | veci | veci | 3.2f | Iterative (Permutation) | try all permutations; get the one that is larger than X | 1193 | 1.8 | no | yes | https://open.kattis.com/problems/veci 450 | UVa | 00639 | | 3.2g | Iterative (Combination) | generate 2^(4x4) = 2^16 combinations and prune | - | 0.0 | no | no | https://onlinejudge.org/external/6/639.pdf 451 | UVa | 01047 | | 3.2g | Iterative (Combination) | LA 3278 - WorldFinals Shanghai05; try all 2^n subsets of towers to be taken; use inclusion-exclusion principle | - | 0.0 | no | no | https://onlinejudge.org/external/10/1047.pdf 452 | UVa | 12694 | | 3.2g | Iterative (Combination) | LA 6606 - Phuket13; it is safest to just brute force all 2^20 possibilities; greedy solution should be possible too | - | 0.0 | no | no | https://onlinejudge.org/external/126/12694.pdf 453 | Kattis | geppetto | geppetto | 3.2g | Iterative (Combination) | try all 2^N subsets of ingredients | 305 | 3.3 | no | no | https://open.kattis.com/problems/geppetto 454 | LeetCode | lc0077 | Combinations | 3.2g | Iterative (Combination) | standard nCk; use itertools.combinations; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/combinations/ 455 | Kattis | squaredeal | squaredeal | 3.2g | 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 | no | no | https://open.kattis.com/problems/squaredeal 456 | Kattis | zagrade | zagrade | 3.2g | Iterative (Combination) | try all subsets of bracket pairs to be removed | 298 | 3.1 | no | no | https://open.kattis.com/problems/zagrade 457 | UVa | 00725 | | 3.2h | Try All Answers | try all possible answers | - | 0.0 | no | no | https://onlinejudge.org/external/7/725.pdf 458 | UVa | 10908 | | 3.2h | Try All Answers | 4 nested loops; try all possible odd square lengths | - | 0.0 | no | no | https://onlinejudge.org/external/109/10908.pdf 459 | Kattis | communication | communication | 3.2h | Try All Answers | try all possible bytes; apply the bitmask formula | 764 | 2.0 | no | no | https://open.kattis.com/problems/communication 460 | Kattis | flexible | flexible | 3.2h | Try All Answers | try all possible answers | 2354 | 1.7 | no | yes | https://open.kattis.com/problems/flexible 461 | Kattis | islands | islands | 3.2h | 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 | no | yes | https://open.kattis.com/problems/islands 462 | LeetCode | lc2843 | Count Symmetric Integers | 3.2h | Try All Answers | create helper function is_symmetric; try all numbers between low..high | 0 | 2.0 | yes | no | https://leetcode.com/problems/count-symmetric-integers/ 463 | Kattis | walls | walls | 3.2h | Try All Answers | try whether the answer is 1/2/3/4; or Impossible; use up to 4 nested loops | 513 | 4.0 | no | no | https://open.kattis.com/problems/walls 464 | UVa | 01225 | | 3.2i | Math Simulation, E | LA 3996 - Danang07; N is small | - | 0.0 | no | no | https://onlinejudge.org/external/12/1225.pdf 465 | UVa | 10346 | | 3.2i | Math Simulation, E | interesting simulation problem | - | 0.0 | no | no | https://onlinejudge.org/external/103/10346.pdf 466 | Kattis | easiest | easiest | 3.2i | Math Simulation, E | complete search; sum of digit | 3991 | 1.6 | no | no | https://open.kattis.com/problems/easiest 467 | Kattis | growlinggears | growlinggears | 3.2i | Math Simulation, E | physics of parabola; derivation; try all gears | 496 | 2.4 | no | no | https://open.kattis.com/problems/growlinggears 468 | LeetCode | lc1823 | Find the Winner of the Circular Game | 3.2i | Math Simulation, E | use Josephus formula | 0 | 4.0 | yes | no | https://leetcode.com/problems/find-the-winner-of-the-circular-game/ 469 | LeetCode | lc2427 | Number of Common Factors | 3.2i | Math Simulation, E | try all x; a and b are small | 0 | 2.0 | yes | no | https://leetcode.com/problems/number-of-common-factors/ 470 | Kattis | trollhunt | trollhunt | 3.2i | Math Simulation, E | brute force; simple | 976 | 2.6 | no | no | https://open.kattis.com/problems/trollhunt 471 | Kattis | videospeedup | videospeedup | 3.2i | Math Simulation, E | brute force; simple for loop; do as asked | 298 | 2.0 | no | no | https://open.kattis.com/problems/videospeedup 472 | LeetCode | lc0970 | Powerful Integers | 3.2j | Math Simulation, M | the values of x^i or y^j will grow fast; search space is small | 0 | 4.0 | yes | no | https://leetcode.com/problems/powerful-integers/ 473 | UVa | 00616 | | 3.2k | Math Simulation, H | brute force up to sqrt(n); get pattern | - | 0.0 | no | no | https://onlinejudge.org/external/6/616.pdf 474 | UVa | 11130 | | 3.2k | Math Simulation, H | mirror the billiard table to the right (and/or top) so that we will only deal with one straight line instead of bouncing... | - | 0.0 | no | no | https://onlinejudge.org/external/111/11130.pdf 475 | UVa | 11254 | | 3.2k | Math Simulation, H | use sum of AP; brute force all values of r from sqrt(2n) down to 1; stop at the first valid a | - | 0.0 | no | no | https://onlinejudge.org/external/112/11254.pdf 476 | UVa | 11490 | | 3.2k | Math Simulation, H | let missing_people = 2*a^2; thickness_of_soldiers = b; derive a formula involving a; b; and the given S | - | 0.0 | no | no | https://onlinejudge.org/external/114/11490.pdf 477 | Kattis | crackingrsa | crackingrsa | 3.2k | Math Simulation, H | a bit number theory; solvable with complete search | 258 | 2.3 | no | no | https://open.kattis.com/problems/crackingrsa 478 | Kattis | falling | falling | 3.2k | Math Simulation, H | rework the formula; complete search up to sqrt(D) | 588 | 3.1 | no | no | https://open.kattis.com/problems/falling 479 | Kattis | thanosthehero | thanosthehero | 3.2k | Math Simulation, H | for-loop from backwards | 320 | 3.9 | no | no | https://open.kattis.com/problems/thanosthehero 480 | UVa | 00151 | | 3.2l | Josephus Problem | the original Josephus problem | - | 0.0 | no | no | https://onlinejudge.org/external/1/151.pdf 481 | UVa | 01176 | | 3.2l | Josephus Problem | LA 2346 - Dhaka01; special case when k = 2; use Josephus recurrence; simulation | - | 0.0 | no | no | https://onlinejudge.org/external/11/1176.pdf 482 | UVa | 11351 | | 3.2l | Josephus Problem | use general case Josephus recurrence | - | 0.0 | no | no | https://onlinejudge.org/external/113/11351.pdf 483 | Kattis | eenymeeny | eenymeeny | 3.2l | Josephus Problem | Josephus problem; small n; just simulate | 492 | 1.7 | no | no | https://open.kattis.com/problems/eenymeeny 484 | Kattis | musicalchairs | musicalchairs | 3.2l | Josephus Problem | Josephus variant; brute force | 139 | 4.0 | no | no | https://open.kattis.com/problems/musicalchairs 485 | Kattis | toys | toys | 3.2l | Josephus Problem | use general case Josephus recurrence | 142 | 4.5 | no | no | https://open.kattis.com/problems/toys 486 | UVa | 10344 | | 3.2m | Backtracking, Easier | 5 operands + 3 operators | - | 0.0 | no | no | https://onlinejudge.org/external/103/10344.pdf 487 | UVa | 10576 | | 3.2m | Backtracking, Easier | generate all; prune; take max | - | 0.0 | no | no | https://onlinejudge.org/external/105/10576.pdf 488 | UVa | 12840 | | 3.2m | Backtracking, Easier | simple backtracking | - | 0.0 | no | no | https://onlinejudge.org/external/128/12840.pdf 489 | Kattis | goodmorning | goodmorning | 3.2m | Backtracking, Easier | we can use backtracking to generate all possible (small) numbers that can be pressed according to the constraints | 347 | 2.7 | no | no | https://open.kattis.com/problems/goodmorning 490 | LeetCode | lc0017 | Letter Combinations of a Phone Number | 3.2m | Backtracking, Easier | classic backtracking; leetcode-75; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/letter-combinations-of-a-phone-number/ 491 | Kattis | natjecanje | natjecanje | 3.2m | 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 | no | no | https://open.kattis.com/problems/natjecanje 492 | Kattis | paintings | paintings | 3.2m | Backtracking, Easier | try all possible paintings based on Catherine's preference; skip hideous color pairs | 162 | 3.6 | no | no | https://open.kattis.com/problems/paintings 493 | UVa | 00208 | | 3.2n | Backtracking, Harder | LA 5147 - WorldFinals SanAntonio91; backtracking with some pruning | - | 0.0 | no | no | https://onlinejudge.org/external/2/208.pdf 494 | UVa | 00222 | | 3.2n | Backtracking, Harder | LA 5161 - WorldFinals Indianapolis93; cannot use DP 'tank' is floating-point; use backtracking | - | 0.0 | no | no | https://onlinejudge.org/external/2/222.pdf 495 | UVa | 01262 | | 3.2n | Backtracking, Harder | LA 4845 - Daejeon10; sort grid columns; process common passwords in lexicographic order; skip two similar passwords | - | 0.0 | no | no | https://onlinejudge.org/external/12/1262.pdf 496 | Kattis | dobra | dobra | 3.2n | 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 | no | no | https://open.kattis.com/problems/dobra 497 | Kattis | fruitbaskets | fruitbaskets | 3.2n | Backtracking, Harder | interesting backtracking problem; compute the small numbers < 200; output all minus this value computed via backtrack... | 493 | 4.1 | no | no | https://open.kattis.com/problems/fruitbaskets 498 | LeetCode | lc0216 | Combination Sum III | 3.2n | Backtracking, Harder | backtracking; bitmask; generate solutions; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/combination-sum-iii/ 499 | Kattis | pagelayout | pagelayout | 3.2n | 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 | no | no | https://open.kattis.com/problems/pagelayout 500 | UVa | 11057 | | 3.3a | Binary Search | sort; target pair problem | - | 0.0 | no | no | https://onlinejudge.org/external/110/11057.pdf 501 | UVa | 11621 | | 3.3a | Binary Search | generate numbers with factor 2 and/or 3; sort; upper_bound | - | 0.0 | no | no | https://onlinejudge.org/external/116/11621.pdf 502 | UVa | 12965 | | 3.3a | Binary Search | sort producer/consumer prices; the answer is one of the prices mentioned; use binary searches to count the answer | - | 0.0 | no | no | https://onlinejudge.org/external/129/12965.pdf 503 | Kattis | firefly | firefly | 3.3a | Binary Search | sort stalactites vs stalagmites separately; brute force height; binary search the obstacles hit | 323 | 4.0 | no | no | https://open.kattis.com/problems/firefly 504 | LeetCode | lc0162 | Find Peak Element | 3.3a | Binary Search | interesting binary-search modification; leetcode-75; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/find-peak-element/ 505 | Kattis | outofsorts | outofsorts | 3.3a | Binary Search | do O(log n) binary searches on unsorted array n times | 107 | 3.7 | no | no | https://open.kattis.com/problems/outofsorts 506 | Kattis | 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 | no | no | https://open.kattis.com/problems/roompainting 507 | UVa | 12190 | | 3.3b | Bisection and BSTA, E | BSTA + algebra | - | 0.0 | no | no | https://onlinejudge.org/external/121/12190.pdf 508 | UVa | 13142 | | 3.3b | Bisection and BSTA, E | BSTA + Physics simulation | - | 0.0 | no | no | https://onlinejudge.org/external/131/13142.pdf 509 | Kattis | carefulascent | carefulascent | 3.3b | Bisection and BSTA, E | BSTA + Physics simulation | 558 | 1.8 | no | no | https://open.kattis.com/problems/carefulascent 510 | Kattis | freeweights | freeweights | 3.3b | Bisection and BSTA, E | BSTA + simulation; Mathematical observation | 356 | 4.5 | no | no | https://open.kattis.com/problems/freeweights 511 | LeetCode | lc0875 | Koko Eating Bananas | 3.3b | Bisection and BSTA, E | BSTA + simulation check; leetcode-75 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/koko-eating-bananas/ 512 | Kattis | monk | monk | 3.3b | Bisection and BSTA, E | BSTA + simulation; cool | 86 | 3.3 | no | no | https://open.kattis.com/problems/monk 513 | Kattis | suspensionbridges | suspensionbridges | 3.3b | Bisection and BSTA, E | BSTA + Maths; be careful of precision error | 409 | 4.6 | no | no | https://open.kattis.com/problems/suspensionbridges 514 | UVa | 00183 | | 3.3c | Ternary Search & Others | simple exercise of DnC | - | 0.0 | no | no | https://onlinejudge.org/external/1/183.pdf 515 | UVa | 10385 | | 3.3c | Ternary Search & Others | the function is unimodal; ternary search | - | 0.0 | no | no | https://onlinejudge.org/external/103/10385.pdf 516 | UVa | 12893 | | 3.3c | Ternary Search & Others | convert the given code into recursive DnC | - | 0.0 | no | no | https://onlinejudge.org/external/128/12893.pdf 517 | Kattis | a1paper | a1paper | 3.3c | Ternary Search & Others | division of A1 paper is a kind of DnC principle | 1212 | 3.9 | no | no | https://open.kattis.com/problems/a1paper 518 | Kattis | 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 | no | no | https://open.kattis.com/problems/ceiling 519 | Kattis | goingtoseed | goingtoseed | 3.3c | Ternary Search & Others | divide to search into four regions; extension of binary/ternary search concept | 199 | 6.3 | no | no | https://open.kattis.com/problems/goingtoseed 520 | LeetCode | lc2293 | Min Max Game | 3.3c | Ternary Search & Others | simulate the game; n halves each level | 0 | 2.0 | yes | no | https://leetcode.com/problems/min-max-game/ 521 | UVa | 01193 | | 3.4a | Greedy (Classical) | LA 2519 - Beijing02; interval covering | - | 0.0 | no | no | https://onlinejudge.org/external/11/1193.pdf 522 | UVa | 10020 | | 3.4a | Greedy (Classical) | interval covering | - | 0.0 | no | no | https://onlinejudge.org/external/100/10020.pdf 523 | UVa | 11264 | | 3.4a | Greedy (Classical) | coin change variant | - | 0.0 | no | no | https://onlinejudge.org/external/112/11264.pdf 524 | Kattis | classrooms | classrooms | 3.4a | Greedy (Classical) | variant of interval covering; multiple rooms | 229 | 5.9 | no | no | https://open.kattis.com/problems/classrooms 525 | Kattis | froshweek2 | froshweek2 | 3.4a | Greedy (Classical) | greedy; sort first; similar to Dragon of Loowater; greedy matching | 489 | 2.3 | no | yes | https://open.kattis.com/problems/froshweek2 526 | LeetCode | lc0455 | Assign Cookies | 3.4a | Greedy (Classical) | sort; greedy bipartite matching | 0 | 2.0 | yes | no | https://leetcode.com/problems/assign-cookies/ 527 | Kattis | squarepegs | squarepegs | 3.4a | Greedy (Classical) | convert square to circular; sort; greedy matching | 265 | 3.1 | no | yes | https://open.kattis.com/problems/squarepegs 528 | UVa | 11369 | | 3.4b | Involving Sorting, E | greedy; sorting | - | 0.0 | no | no | https://onlinejudge.org/external/113/11369.pdf 529 | UVa | 11900 | | 3.4b | Involving Sorting, E | greedy; sorting | - | 0.0 | no | no | https://onlinejudge.org/external/119/11900.pdf 530 | UVa | 13109 | | 3.4b | Involving Sorting, E | greedy; sorting | - | 0.0 | no | no | https://onlinejudge.org/external/131/13109.pdf 531 | Kattis | icpcteamselection | icpcteamselection | 3.4b | Involving Sorting, E | greedy; sorting | 586 | 3.0 | no | no | https://open.kattis.com/problems/icpcteamselection 532 | LeetCode | lc1913 | Maximum Product Difference Between Two Pairs | 3.4b | Involving Sorting, E | sort; use the last and first two | 0 | 2.0 | yes | no | https://leetcode.com/problems/maximum-product-difference-between-two-pairs/ 533 | Kattis | minimumscalar | minimumscalar | 3.4b | Involving Sorting, E | one sort increasing; one sort decreasing | 1202 | 2.3 | no | no | https://open.kattis.com/problems/minimumscalar 534 | Kattis | shopaholic | shopaholic | 3.4b | Involving Sorting, E | sort prices in descending order, pick every third item | 959 | 2.4 | no | no | https://open.kattis.com/problems/shopaholic 535 | LeetCode | lc0435 | Non-overlapping Intervals | 3.4c | Involving Sorting, M | sort by non-decreasing endpoints; greedy; leetcode-75 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/non-overlapping-intervals/ 536 | LeetCode | lc0452 | Minimum Number of Arrows to Burst Balloons | 3.4c | Involving Sorting, M | sort by non-decreasing endpoints; greedy; leetcode-75; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/ 537 | LeetCode | lc0881 | Boats to Save People | 3.4c | Involving Sorting, M | sort people by non-dec weights; two pointers: lightest+heaviest; greedy | 0 | 4.0 | yes | no | https://leetcode.com/problems/boats-to-save-people/ 538 | LeetCode | lc1090 | Largest Values From Labels | 3.4c | Involving Sorting, M | sort by non-increasing values | 0 | 4.0 | yes | no | https://leetcode.com/problems/largest-values-from-labels/ 539 | LeetCode | lc1282 | Group the People Given the Group Size They Belong To | 3.4c | Involving Sorting, M | sort by non-decreasing size, keep the original indices | 0 | 4.0 | yes | no | https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to/ 540 | LeetCode | lc2895 | Minimum Processing Time | 3.4c | Involving Sorting, M | sort tasks by non-increasing order and processor time by non-decreasing order | 0 | 4.0 | yes | no | https://leetcode.com/problems/minimum-processing-time/ 541 | LeetCode | lc3301 | Maximize the Total Height of Unique Towers | 3.4c | Involving Sorting, M | sort by non-increasing maximum height | 0 | 4.0 | yes | no | https://leetcode.com/problems/maximize-the-total-height-of-unique-towers/ 542 | UVa | 12673 | | 3.4d | Involving Sorting, H | LA 6530 - LatinAmerica13; greedy; sorting | - | 0.0 | no | no | https://onlinejudge.org/external/126/12673.pdf 543 | UVa | 12834 | | 3.4d | Involving Sorting, H | greedy; sorting | - | 0.0 | no | no | https://onlinejudge.org/external/128/12834.pdf 544 | UVa | 13054 | | 3.4d | Involving Sorting, H | greedy; sorting | - | 0.0 | no | no | https://onlinejudge.org/external/130/13054.pdf 545 | Kattis | airconditioned | airconditioned | 3.4d | Involving Sorting, H | greedy; sorting | 1116 | 3.9 | no | no | https://open.kattis.com/problems/airconditioned 546 | Kattis | birds | birds | 3.4d | Involving Sorting, H | greedy; sorting | 566 | 3.5 | no | no | https://open.kattis.com/problems/birds 547 | Kattis | delivery | delivery | 3.4d | Involving Sorting, H | sort, process positive and negative delivery separately; go to rightmost, come back and fill as many from the right | 253 | 3.3 | no | no | https://open.kattis.com/problems/delivery 548 | LeetCode | lc0055 | Jump Game | 3.4d | Involving Sorting, H | for each reachable i, greedily extend the furthest jump, if we can; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/jump-game/ 549 | UVa | 01153 | | 3.4e | Involving PQ | greedy; priority queue | - | 0.0 | no | no | https://onlinejudge.org/external/11/1153.pdf 550 | UVa | 13177 | | 3.4e | Involving PQ | greedy; priority queue | - | 0.0 | no | no | https://onlinejudge.org/external/131/13177.pdf 551 | Kattis | ballotboxes | ballotboxes | 3.4e | Involving PQ | greedy; priority queue | 776 | 4.4 | no | no | https://open.kattis.com/problems/ballotboxes 552 | Kattis | canvas | canvas | 3.4e | Involving PQ | PQ simulation; process from N canvases to 1 all-white canvas; take two minimum canvas size; greedy; add them and re-enqu... | 214 | 3.5 | no | no | https://open.kattis.com/problems/canvas 553 | LeetCode | lc2542 | Maximum Subsequence Score | 3.4e | Involving PQ | sort (nums2[i], nums1[i]) by non-increasing nums2; maintain min PQ of nums1; keep largest k; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/maximum-subsequence-score/ 554 | Kattis | vegetables | vegetables | 3.4e | Involving PQ | store cut lengths as fractions; keep taking the largest portion; greedy; try to cut 1/2,1/3,1/4,etc; re-enqueue the resu... | 347 | 3.4 | no | no | https://open.kattis.com/problems/vegetables 555 | Kattis | workstations | workstations | 3.4e | Involving PQ | greedy; priority queue | 1110 | 3.6 | no | no | https://open.kattis.com/problems/workstations 556 | UVa | 10656 | | 3.4f | Non-Classical, Easier | greedy | - | 0.0 | no | no | https://onlinejudge.org/external/106/10656.pdf 557 | UVa | 11520 | | 3.4f | Non-Classical, Easier | greedy | - | 0.0 | no | no | https://onlinejudge.org/external/115/11520.pdf 558 | UVa | 12482 | | 3.4f | Non-Classical, Easier | greedy | - | 0.0 | no | no | https://onlinejudge.org/external/124/12482.pdf 559 | Kattis | ants | ants | 3.4f | Non-Classical, Easier | greedy; also available at UVa 10714 - Ants | 1145 | 2.5 | no | no | https://open.kattis.com/problems/ants 560 | Kattis | bank | bank | 3.4f | Non-Classical, Easier | greedy | 2389 | 2.6 | no | no | https://open.kattis.com/problems/bank 561 | LeetCode | lc0860 | Lemonade Change | 3.4f | Non-Classical, Easier | use 10+5 before 5+5+5; programming-skills | 0 | 2.0 | yes | no | https://leetcode.com/problems/lemonade-change/ 562 | Kattis | marblestree | marblestree | 3.4f | Non-Classical, Easier | greedy; also available at UVa 10672 - Marbles on a tree | 258 | 3.0 | no | no | https://open.kattis.com/problems/marblestree 563 | UVa | 10821 | | 3.4g | Non-Classical, Harder | greedy | - | 0.0 | no | no | https://onlinejudge.org/external/108/10821.pdf 564 | UVa | 11491 | | 3.4g | Non-Classical, Harder | greedy | - | 0.0 | no | no | https://onlinejudge.org/external/114/11491.pdf 565 | UVa | 11583 | | 3.4g | Non-Classical, Harder | greedy | - | 0.0 | no | no | https://onlinejudge.org/external/115/11583.pdf 566 | UVa | 11890 | | 3.4g | Non-Classical, Harder | greedy | - | 0.0 | no | no | https://onlinejudge.org/external/118/11890.pdf 567 | Kattis | dvds | dvds | 3.4g | Non-Classical, Harder | greedy | 731 | 2.9 | no | no | https://open.kattis.com/problems/dvds 568 | LeetCode | lc0763 | Partition Labels | 3.4g | Non-Classical, Harder | DAT last occurence of ('a'..'z'); one-pass greedy solution is possible; top-100-liked | 0 | 4.0 | yes | no | https://leetcode.com/problems/partition-labels/ 569 | Kattis | stockbroker | stockbroker | 3.4g | Non-Classical, Harder | greedy | 578 | 3.4 | no | no | https://open.kattis.com/problems/stockbroker 570 | Kattis | virus | virus | 3.4g | Non-Classical, Harder | greedy | 753 | 3.6 | no | no | https://open.kattis.com/problems/virus 571 | UVa | 10684 | | 3.5a | 1D Range Sum | standard; Kadane's algorithm | - | 0.0 | no | yes | https://onlinejudge.org/external/106/10684.pdf 572 | Kattis | commercials | commercials | 3.5a | 1D Range Sum | transform each input by -P; Kadane's algorithm | 1570 | 2.0 | no | yes | https://open.kattis.com/problems/commercials 573 | LeetCode | lc0053 | Maximum Subarray | 3.5a | 1D Range Sum | Kadane's; special case for all negatives; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/maximum-subarray/ 574 | Kattis | sellingspatulas | sellingspatulas | 3.5a | 1D Range Sum | -8 per time slot initially; read sale data; 1D range sum; complete search | 109 | 8.0 | no | yes | https://open.kattis.com/problems/sellingspatulas 575 | Kattis | shortsell | shortsell | 3.5a | 1D Range Sum | similar to Kadane's algorithm; linear pass; prefix sum | 104 | 4.1 | no | yes | https://open.kattis.com/problems/shortsell 576 | UVa | 01105 | | 3.5b | 2D Range Sum | LA 5132 - WorldFinals Orlando11; more advanced 2D Range Sum Queries | - | 0.0 | no | no | https://onlinejudge.org/external/11/1105.pdf 577 | UVa | 10755 | | 3.5b | 2D Range Sum | max 2D range sum in 2 of the 3 dimensions; max 1D range sum with Kadane's algorithm on the 3rd dimension | - | 0.0 | no | no | https://onlinejudge.org/external/107/10755.pdf 578 | LeetCode | lc0085 | Maximal Rectangle | 3.5b | 2D Range Sum | after penalising the 0s heavily, this is just max 2D range sum | 0 | 6.0 | yes | no | https://leetcode.com/problems/maximal-rectangle/ 579 | Kattis | prozor | prozor | 3.5b | 2D Range Sum | 2D range sum with fix range; output formatting | 558 | 1.6 | no | no | https://open.kattis.com/problems/prozor 580 | UVa | 00481 | | 3.5c | LIS | O(n log k) LIS+solution | - | 0.0 | no | no | https://onlinejudge.org/external/4/481.pdf 581 | UVa | 01196 | | 3.5c | LIS | LA 2815 - Kaohsiung03; sort all the blocks in increasing L[i]; then we get the classical LIS problem | - | 0.0 | no | no | https://onlinejudge.org/external/11/1196.pdf 582 | UVa | 11790 | | 3.5c | LIS | combination of LIS LDS; weighted | - | 0.0 | no | no | https://onlinejudge.org/external/117/11790.pdf 583 | Kattis | increasingsubsequence | increasingsubsequence | 3.5c | LIS | LIS; n ≤ 200$; print lexicographically smallest solution, 99% similar to 'longincsubseq' | 352 | 4.1 | no | no | https://open.kattis.com/problems/increasingsubsequence 584 | LeetCode | lc0334 | Increasing Triplet Subsequence | 3.5c | LIS | LIS problem with a very small tweak; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/increasing-triplet-subsequence/ 585 | Kattis | nesteddolls | nesteddolls | 3.5c | LIS | sort in one dimension; Dilworth's theorem; LIS in the other; also available at UVa 11368 - Nested Dolls | 115 | 7.1 | no | no | https://open.kattis.com/problems/nesteddolls 586 | Kattis | trainsorting | trainsorting | 3.5c | LIS | max(LIS(i)+LDS(i)-1), ∀i ∈ [0...n-1]; also available at UVa 11456 | 522 | 5.4 | no | no | https://open.kattis.com/problems/trainsorting 587 | UVa | 01213 | | 3.5d | 0-1 KNAPSACK/SS | LA 3619 - Yokohama06; extension of 0-1 KNAPSACK; s: (id, remN, remK) instead of s: (id, remN) | - | 0.0 | no | no | https://onlinejudge.org/external/12/1213.pdf 588 | UVa | 10130 | | 3.5d | 0-1 KNAPSACK/SS | basic 0-1 Knapsack problem | - | 0.0 | no | no | https://onlinejudge.org/external/101/10130.pdf 589 | UVa | 11832 | | 3.5d | 0-1 KNAPSACK/SS | interesting DP; s: (id; val); use offset to handle negative numbers; t: plus or minus; print solution | - | 0.0 | no | no | https://onlinejudge.org/external/118/11832.pdf 590 | Kattis | knapsack | knapsack | 3.5d | 0-1 KNAPSACK/SS | basic DP KNAPSACK; print the solution | 687 | 4.8 | no | yes | https://open.kattis.com/problems/knapsack 591 | LeetCode | lc0474 | Ones and Zeroes | 3.5d | 0-1 KNAPSACK/SS | Knapsack; skip or take a string | 0 | 4.0 | yes | yes | https://leetcode.com/problems/ones-and-zeroes/ 592 | Kattis | orders | orders | 3.5d | 0-1 KNAPSACK/SS | interesting KNAPSACK variant; print the solution | 713 | 4.5 | no | no | https://open.kattis.com/problems/orders 593 | Kattis | presidentialelections | presidentialelections | 3.5d | 0-1 KNAPSACK/SS | pre-process the input to discard non winnable states; be careful of negative total voters; then standard DP KNAPSACK | 116 | 5.7 | no | no | https://open.kattis.com/problems/presidentialelections 594 | UVa | 00242 | | 3.5e | COIN-CHANGE | LA 5181 - WorldFinals Nashville95; Complete Search + DP Coin-Change | - | 0.0 | no | no | https://onlinejudge.org/external/2/242.pdf 595 | UVa | 00674 | | 3.5e | COIN-CHANGE | basic coin change problem | - | 0.0 | no | no | https://onlinejudge.org/external/6/674.pdf 596 | UVa | 11259 | | 3.5e | COIN-CHANGE | part of the problem is DP COIN-CHANGE with restricted number of coins per type; inclusion-exclusion | - | 0.0 | no | no | https://onlinejudge.org/external/112/11259.pdf 597 | Kattis | bagoftiles | bagoftiles | 3.5e | 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 | no | no | https://open.kattis.com/problems/bagoftiles 598 | Kattis | canonical | canonical | 3.5e | COIN-CHANGE | complete search possible range of counter examples; do both greedy COIN-CHANGE and DP COIN-CHANGE | 502 | 5.7 | no | no | https://open.kattis.com/problems/canonical 599 | Kattis | exactchange2 | exactchange2 | 3.5e | COIN-CHANGE | a variation to the Coin-Change problem; also available at UVa 11517 - Exact Change | 708 | 5.4 | no | no | https://open.kattis.com/problems/exactchange2 600 | LeetCode | lc0322 | Coin Change | 3.5e | COIN-CHANGE | COIN-CHANGE; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/coin-change/ 601 | UVa | 00216 | | 3.5f | TSP | LA 5155 - WorldFinals KansasCity92; DP TSP problem; but still solvable with backtracking | - | 0.0 | no | no | https://onlinejudge.org/external/2/216.pdf 602 | UVa | 11795 | | 3.5f | TSP | DP TSP variant; counting paths on DAG; DP+bitmask; let Mega Buster owned by a dummy 'Robot 0' | - | 0.0 | no | no | https://onlinejudge.org/external/117/11795.pdf 603 | UVa | 12841 | | 3.5f | TSP | simply find and print the lexicographically smallest Hamiltonian path; use DP-TSP technique | - | 0.0 | no | no | https://onlinejudge.org/external/128/12841.pdf 604 | Kattis | beepers | beepers | 3.5f | TSP | DP or recursive backtracking with sufficient pruning; also available at UVa 10496 - Collecting Beepers | 196 | 4.6 | no | no | https://open.kattis.com/problems/beepers 605 | Kattis | bustour | bustour | 3.5f | TSP | LA 6028 - WorldFinals Warsaw12; DP TSP variant; also available at UVa 01281 - Bus Tour | 124 | 6.1 | no | no | https://open.kattis.com/problems/bustour 606 | Kattis | cycleseasy | cycleseasy | 3.5f | TSP | Count number of HAMILTONIAN-TOURs | 108 | 4.1 | no | no | https://open.kattis.com/problems/cycleseasy 607 | Kattis | errands | errands | 3.5f | TSP | map location names to integer indices; DP TSP | 51 | 7.0 | no | no | https://open.kattis.com/problems/errands 608 | UVa | 01261 | | 3.5g | Non-Classical, 1D, E | LA 4844 - Daejeon10; backtracking possible; but we use a set to prevent recomputation | - | 0.0 | no | no | https://onlinejudge.org/external/12/1261.pdf 609 | UVa | 11420 | | 3.5g | Non-Classical, 1D, E | s: (prev; id; numlck); lock/unlock this chest | - | 0.0 | no | no | https://onlinejudge.org/external/114/11420.pdf 610 | UVa | 12654 | | 3.5g | Non-Classical, 1D, E | s: (hole); t: use patch T1 or patch T2 | - | 0.0 | no | no | https://onlinejudge.org/external/126/12654.pdf 611 | LeetCode | lc0746 | Min Cost Climbing Stairs | 3.5g | Non-Classical, 1D, E | s: (i); t: to (i+1) or (i+2); Fibonacci variant; leetcode-75 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/min-cost-climbing-stairs/ 612 | UVa | 10003 | | 3.5h | Non-Classical, 2D, E | discussed in this section | - | 0.0 | no | no | https://onlinejudge.org/external/100/10003.pdf 613 | UVa | 11450 | | 3.5h | Non-Classical, 2D, E | discussed in this section | - | 0.0 | no | no | https://onlinejudge.org/external/114/11450.pdf 614 | UVa | 13141 | | 3.5h | Non-Classical, 2D, E | s: (level, branch_previously); t: not branching if branch_previously or branching (one side) otherwise | - | 0.0 | no | no | https://onlinejudge.org/external/131/13141.pdf 615 | Kattis | nikola | nikola | 3.5h | Non-Classical, 2D, E | s: (pos, last_jump); t: jump forward or backward | 295 | 3.6 | no | no | https://open.kattis.com/problems/nikola 616 | Kattis | spiderman | spiderman | 3.5h | Non-Classical, 2D, E | simple DP; go up or down; print solution | 1010 | 3.9 | no | no | https://open.kattis.com/problems/spiderman 617 | Kattis | ticketpricing | ticketpricing | 3.5h | Non-Classical, 2D, E | LA 6867 - Rocky Mountain15; similar with UVa 11450 discussed in this book; real life problem; print (the first) part of ... | 138 | 4.9 | no | no | https://open.kattis.com/problems/ticketpricing 618 | UVa | 12324 | | 3.5i | DP level 2 | spheres > n are useless | - | 0.0 | no | no | https://onlinejudge.org/external/123/12324.pdf 619 | UVa | 12862 | | 3.5i | DP level 2 | 1D DP to compute the path cost from every vertex that goes up to the mountain top; compute answer | - | 0.0 | no | no | https://onlinejudge.org/external/128/12862.pdf 620 | UVa | 12955 | | 3.5i | DP level 2 | there are only 8 eligible factorials under 100000; we can use DP; s: (i, sum); t: take/stay, take/move, don't take/move | - | 0.0 | no | no | https://onlinejudge.org/external/129/12955.pdf 621 | Kattis | kutevi | kutevi | 3.5i | DP level 2 | s: (360 integer degrees) | 170 | 2.6 | no | no | https://open.kattis.com/problems/kutevi 622 | LeetCode | lc0714 | Best Time to Buy and Sell Stock with Transaction Fee | 3.5i | DP level 2 | s: (own, i); t: skip day i or sell if own/buy if not; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/ 623 | Kattis | tight | tight | 3.5i | 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 | no | no | https://open.kattis.com/problems/tight 624 | Kattis | walrusweights | walrusweights | 3.5i | DP level 2 | backtracking with memoization | 570 | 3.8 | no | yes | https://open.kattis.com/problems/walrusweights 625 | UVa | 11749 | | 4.2a | Finding CCs | find the largest CC with highest average PPA; also solvable with UFDS | - | 0.0 | no | no | https://onlinejudge.org/external/117/11749.pdf 626 | UVa | 11906 | | 4.2a | Finding CCs | DFS/BFS for reachability; several tricky cases; be careful when M = 0; N = 0; or M = N | - | 0.0 | no | no | https://onlinejudge.org/external/119/11906.pdf 627 | LeetCode | lc0547 | Number of Provinces | 4.2a | Finding CCs | count number of CCs; leetcode-75 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/number-of-provinces/ 628 | Kattis | reachableroads | reachableroads | 4.2a | Finding CCs | report number of CC-1 | 892 | 2.1 | no | yes | https://open.kattis.com/problems/reachableroads 629 | Kattis | securitybadge | securitybadge | 4.2a | Finding CCs | reachability test; clever idea to compress ids | 129 | 7.6 | no | no | https://open.kattis.com/problems/securitybadge 630 | Kattis | 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 | no | no | https://open.kattis.com/problems/terraces 631 | Kattis | wheresmyinternet | wheresmyinternet | 4.2a | Finding CCs | check connectivity to vertex 1 | 1716 | 3.7 | no | yes | https://open.kattis.com/problems/wheresmyinternet 632 | UVa | 00352 | | 4.2b | Flood Fill, Easier | count number of CCs; see UVa 00572 | - | 0.0 | no | yes | https://onlinejudge.org/external/3/352.pdf 633 | UVa | 11953 | | 4.2b | Flood Fill, Easier | interesting twist of flood fill problem | - | 0.0 | no | no | https://onlinejudge.org/external/119/11953.pdf 634 | Kattis | amoebas | amoebas | 4.2b | Flood Fill, Easier | easy floodfill | 1079 | 1.8 | no | yes | https://open.kattis.com/problems/amoebas 635 | Kattis | countingstars | countingstars | 4.2b | Flood Fill, Easier | basic flood fill problem; count CCs | 1494 | 2.7 | no | yes | https://open.kattis.com/problems/countingstars 636 | Kattis | fontan | fontan | 4.2b | Flood Fill, Easier | modified multi-sources BFS/floodfill | 866 | 2.0 | no | no | https://open.kattis.com/problems/fontan 637 | Kattis | gold | gold | 4.2b | Flood Fill, Easier | flood fill with extra blocking constraint; also available at UVa 11561 - Getting Gold | 735 | 2.2 | no | no | https://open.kattis.com/problems/gold 638 | LeetCode | lc0733 | Flood Fill | 4.2b | Flood Fill, Easier | basic flood fill problem | 0 | 2.0 | yes | yes | https://leetcode.com/problems/flood-fill/ 639 | UVa | 01103 | | 4.2c | Flood Fill, Harder | LA 5130 - WorldFinals Orlando11; major hint: each hieroglyph has unique number of white CCs | - | 0.0 | no | no | https://onlinejudge.org/external/11/1103.pdf 640 | Kattis | 10kindsofpeople | 10kindsofpeople | 4.2c | Flood Fill, Harder | intelligent flood fill; just run once to avoid TLE as there are many queries | 2380 | 3.9 | no | yes | https://open.kattis.com/problems/10kindsofpeople 641 | UVa | 11585 | | 4.2c | Flood Fill, Harder | polynomial-time verifier for an NP-complete puzzle Nurikabe; this verifier requires clever usage of flood fill algorithm | - | 0.0 | no | no | https://onlinejudge.org/external/115/11585.pdf 642 | Kattis | coast | coast | 4.2c | Flood Fill, Harder | intelligent flood fill; just run once to avoid TLE as there are many queries | 1339 | 3.2 | no | no | https://open.kattis.com/problems/coast 643 | Kattis | islands3 | islands3 | 4.2c | Flood Fill, Harder | optimistic flood fill; assume all Cs are Ls | 936 | 2.1 | no | yes | https://open.kattis.com/problems/islands3 644 | LeetCode | lc1254 | Number of Closed Islands | 4.2c | Flood Fill, Harder | flood fill; avoiding borders | 0 | 4.0 | yes | yes | https://leetcode.com/problems/number-of-closed-islands/ 645 | UVa | 00872 | | 4.2d | Topological Sort | similar to UVa 00124; use backtracking | - | 0.0 | no | no | https://onlinejudge.org/external/8/872.pdf 646 | UVa | 11060 | | 4.2d | Topological Sort | Kahn's algorithm---modified BFS toposort | - | 0.0 | no | no | https://onlinejudge.org/external/110/11060.pdf 647 | Kattis | brexit | brexit | 4.2d | Topological Sort | toposort; chain reaction; modified Kahn's algorithm | 826 | 3.6 | no | no | https://open.kattis.com/problems/brexit 648 | Kattis | builddeps | builddeps | 4.2d | Topological Sort | the graph is acyclic; toposort with DFS from the changed file | 626 | 4.7 | no | yes | https://open.kattis.com/problems/builddeps 649 | Kattis | 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 | no | no | https://open.kattis.com/problems/conservation 650 | LeetCode | lc0210 | Course Schedule II | 4.2d | Topological Sort | cycle check; compute toposort if acyclic; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/course-schedule-ii/ 651 | Kattis | pickupsticks | pickupsticks | 4.2d | Topological Sort | cycle check + toposort if DAG; also available at item UVa 11686 - Pick up sticks | 373 | 4.7 | no | yes | https://open.kattis.com/problems/pickupsticks 652 | UVa | 10116 | | 4.2e | Graph Properties Check | traversal on implicit graph; cycle check | - | 0.0 | no | no | https://onlinejudge.org/external/101/10116.pdf 653 | UVa | 10505 | | 4.2e | Graph Properties Check | bipartite; take max(left; right) | - | 0.0 | no | no | https://onlinejudge.org/external/105/10505.pdf 654 | Kattis | 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 | no | no | https://open.kattis.com/problems/hoppers 655 | LeetCode | lc0207 | Course Schedule | 4.2e | Graph Properties Check | is the directed graph acyclic?; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/course-schedule/ 656 | Kattis | 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 | no | no | https://open.kattis.com/problems/molekule 657 | Kattis | runningmom | runningmom | 4.2e | Graph Properties Check | find a cycle in a directed graph | 591 | 3.8 | no | no | https://open.kattis.com/problems/runningmom 658 | Kattis | torn2pieces | torn2pieces | 4.2e | Graph Properties Check | construct graph from strings; traversal from source to target; reachability check; print path | 1115 | 3.6 | no | no | https://open.kattis.com/problems/torn2pieces 659 | UVa | 10765 | | 4.2f | Cut Vertices/Bridges | finding articulation points | - | 0.0 | no | no | https://onlinejudge.org/external/107/10765.pdf 660 | UVa | 12363 | | 4.2f | Cut Vertices/Bridges | LA 5796 - Latin America; transform input to graph of its bridges; see if b is reachable from a with only the bridges | - | 0.0 | no | no | https://onlinejudge.org/external/123/12363.pdf 661 | UVa | 12783 | | 4.2f | Cut Vertices/Bridges | finding bridges | - | 0.0 | no | no | https://onlinejudge.org/external/127/12783.pdf 662 | Kattis | 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 | no | no | https://open.kattis.com/problems/birthday 663 | Kattis | caveexploration | caveexploration | 4.2f | Cut Vertices/Bridges | find size of bi-connected components that contains vertex 0; identify the bridges | 848 | 3.3 | no | no | https://open.kattis.com/problems/caveexploration 664 | Kattis | gymleadersterritory | gymleadersterritory | 4.2f | Cut Vertices/Bridges | if all edges connected to vertex k are bridges, then `YES`; otherwise `NO` | 165 | 3.5 | yes | no | https://open.kattis.com/problems/gymleadersterritory 665 | Kattis | intercept | intercept | 4.2f | Cut Vertices/Bridges | Articulation Points in SSSP Spanning DAG; clever modification of Dijkstra's | 112 | 6.6 | no | no | https://open.kattis.com/problems/intercept 666 | UVa | 00247 | | 4.2g | Finding SCCs | SCC + printing solution | - | 0.0 | no | no | https://onlinejudge.org/external/2/247.pdf 667 | UVa | 11709 | | 4.2g | Finding SCCs | find the number of SCCs | - | 0.0 | no | no | https://onlinejudge.org/external/117/11709.pdf 668 | UVa | 11770 | | 4.2g | Finding SCCs | similar to UVa 11504 | - | 0.0 | no | no | https://onlinejudge.org/external/117/11770.pdf 669 | Kattis | cantinaofbabel | cantinaofbabel | 4.2g | Finding SCCs | build directed graph 'can_speak'; compute the largest SCC of 'can_speak'; keep this largest SCC | 1294 | 3.2 | no | no | https://open.kattis.com/problems/cantinaofbabel 670 | Kattis | 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 | no | no | https://open.kattis.com/problems/dominos 671 | Kattis | 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 | no | no | https://open.kattis.com/problems/equivalences 672 | Kattis | reversingroads | reversingroads | 4.2g | Finding SCCs | if #SCC = 1, print 'valid'; or try reversing one of the m directed edges until we either have #SCC = 1, or print 'invali... | 640 | 3.7 | no | no | https://open.kattis.com/problems/reversingroads 673 | UVa | 11831 | | 4.2h | Really Ad Hoc | traversal on implicit graph | - | 0.0 | no | no | https://onlinejudge.org/external/118/11831.pdf 674 | UVa | 12442 | | 4.2h | Really Ad Hoc | modified DFS; special graph | - | 0.0 | no | no | https://onlinejudge.org/external/124/12442.pdf 675 | Kattis | dominoes2 | dominoes2 | 4.2h | Really Ad Hoc | unlike UVa 11504, we treat SCCs as CCs; also available at UVa 11518 - Dominos 2 | 599 | 3.3 | no | no | https://open.kattis.com/problems/dominoes2 676 | Kattis | faultyrobot | faultyrobot | 4.2h | Really Ad Hoc | interesting graph traversal variant; add one more state to each vertex: bug_used | 556 | 3.6 | no | no | https://open.kattis.com/problems/faultyrobot 677 | LeetCode | lc0841 | Keys and Rooms | 4.2h | Really Ad Hoc | DFS/BFS from 0; see if all rooms are visited; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/keys-and-rooms/ 678 | Kattis | promotions | promotions | 4.2h | Really Ad Hoc | modified DFS; special graph; DAG; also available at UVa 13015 - Promotions | 129 | 5.5 | no | no | https://open.kattis.com/problems/promotions 679 | Kattis | 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 | no | no | https://open.kattis.com/problems/succession 680 | UVa | 11631 | | 4.3a | MST, Standard | weight of (all graph edges - all MST edges) | - | 0.0 | no | yes | https://onlinejudge.org/external/116/11631.pdf 681 | UVa | 11747 | | 4.3a | MST, Standard | sum the edge weights of the chords | - | 0.0 | no | no | https://onlinejudge.org/external/117/11747.pdf 682 | Kattis | cats | cats | 4.3a | MST, Standard | standard MST | 456 | 4.1 | no | yes | https://open.kattis.com/problems/cats 683 | Kattis | islandhopping | islandhopping | 4.3a | MST, Standard | MST on small complete graph | 440 | 3.0 | no | yes | https://open.kattis.com/problems/islandhopping 684 | LeetCode | lc1584 | Min Cost to Connect All Points | 4.3a | MST, Standard | basic MST problem | 0 | 4.0 | yes | yes | https://leetcode.com/problems/min-cost-to-connect-all-points/ 685 | Kattis | lostmap | lostmap | 4.3a | MST, Standard | actually just a standard MST problem | 782 | 2.1 | no | yes | https://open.kattis.com/problems/lostmap 686 | Kattis | 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 | no | yes | https://open.kattis.com/problems/minspantree 687 | UVa | 01013 | | 4.3b | MST, Variants | LA 2478 - WorldFinals Honolulu02; very interesting MST variant | - | 0.0 | no | no | https://onlinejudge.org/external/10/1013.pdf 688 | UVa | 01265 | | 4.3b | MST, Variants | LA 4848 - Daejeon10; very interesting non-standard variant of 'maximum' spanning tree | - | 0.0 | no | no | https://onlinejudge.org/external/12/1265.pdf 689 | UVa | 10457 | | 4.3b | MST, Variants | interesting MST modeling | - | 0.0 | no | no | https://onlinejudge.org/external/104/10457.pdf 690 | Kattis | millionairemadness | millionairemadness | 4.3b | MST, Variants | MiniMax path problem | 649 | 2.4 | no | no | https://open.kattis.com/problems/millionairemadness 691 | Kattis | muddyhike | muddyhike | 4.3b | MST, Variants | MiniMax path problem | 209 | 3.9 | no | no | https://open.kattis.com/problems/muddyhike 692 | Kattis | naturereserve | naturereserve | 4.3b | MST, Variants | Prim's algorithm from multiple sources | 180 | 4.6 | no | no | https://open.kattis.com/problems/naturereserve 693 | UVa | 10653 | | 4.4a | SSSP, BFS, Easier | need efficient BFS implementation | - | 0.0 | no | no | https://onlinejudge.org/external/106/10653.pdf 694 | UVa | 12160 | | 4.4a | SSSP, BFS, Easier | LA 4408 - KualaLumpur08; s: (4-digits number); edges: button pushes; BFS | - | 0.0 | no | no | https://onlinejudge.org/external/121/12160.pdf 695 | Kattis | buttonbashing | buttonbashing | 4.4a | SSSP, BFS, Easier | very similar to UVa 12160 | 728 | 3.4 | no | no | https://open.kattis.com/problems/buttonbashing 696 | Kattis | 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 | no | yes | https://open.kattis.com/problems/horror 697 | UVa | 11352 | | 4.4b | SSSP, BFS, Medium | filter the graph first; then it becomes SSSP | - | 0.0 | no | no | https://onlinejudge.org/external/113/11352.pdf 698 | UVa | 12826 | | 4.4b | SSSP, BFS, Medium | SSSP from (r1; c1) to (r2; c2) avoiding (r3; c3); BFS | - | 0.0 | no | no | https://onlinejudge.org/external/128/12826.pdf 699 | Kattis | fire2 | fire2 | 4.4b | SSSP, BFS, Medium | very similar to UVa 11624 | 395 | 4.2 | no | no | https://open.kattis.com/problems/fire2 700 | LeetCode | lc1926 | Nearest Exit from Entrance in Maze | 4.4b | SSSP, BFS, Medium | BFS on grid; stop at border (that is not source); leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/nearest-exit-from-entrance-in-maze/ 701 | Kattis | lost | lost | 4.4b | SSSP, BFS, Medium | interesting twist of BFS/SSSP spanning tree | 269 | 4.7 | no | no | https://open.kattis.com/problems/lost 702 | Kattis | mallmania | mallmania | 4.4b | SSSP, BFS, Medium | multi-sources BFS from m1; get minimum at border of m2; also available at UVa 11101 - Mall Mania | 48 | 4.9 | no | no | https://open.kattis.com/problems/mallmania 703 | Kattis | oceancurrents | oceancurrents | 4.4b | SSSP, BFS, Medium | 0/1-weighted SSSP; BFS+deque; also available at UVa 11573 - Ocean Currents | 118 | 5.4 | no | no | https://open.kattis.com/problems/oceancurrents 704 | UVa | 00439 | | 4.4c | Knight Moves, BFS | one BFS per query is enough | - | 0.0 | no | no | https://onlinejudge.org/external/4/439.pdf 705 | UVa | 10426 | | 4.4c | Knight Moves, BFS | for each knight, do BFS when the monster is sleep/awake; try: one awake the monster, the rest go around | - | 0.0 | no | no | https://onlinejudge.org/external/104/10426.pdf 706 | UVa | 10477 | | 4.4c | Knight Moves, BFS | s: (row; col; knight_state); implicit unweighted graph; different edges per different knight_state | - | 0.0 | no | no | https://onlinejudge.org/external/104/10477.pdf 707 | Kattis | grasshopper | grasshopper | 4.4c | Knight Moves, BFS | BFS on implicit Knight jump graph | 136 | 4.0 | no | no | https://open.kattis.com/problems/grasshopper 708 | Kattis | hidingplaces | hidingplaces | 4.4c | Knight Moves, BFS | SSSP from (r, c); find cells with max distance; print | 607 | 1.9 | no | no | https://open.kattis.com/problems/hidingplaces 709 | LeetCode | lc2596 | Check Knight Tour Configuration | 4.4c | Knight Moves, BFS | standard knight tour; BFS; 8 directions | 0 | 4.0 | yes | no | https://leetcode.com/problems/check-knight-tour-configuration/ 710 | UVa | 01112 | | 4.4e | SSSP, Dijkstra, Easier | LA 2425 - SouthwesternEurope01; SDSP | - | 0.0 | no | no | https://onlinejudge.org/external/11/1112.pdf 711 | UVa | 13127 | | 4.4e | SSSP, Dijkstra, Easier | Dijkstra's from multiple sources | - | 0.0 | no | no | https://onlinejudge.org/external/131/13127.pdf 712 | Kattis | flowerytrails | flowerytrails | 4.4e | 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 | no | no | https://open.kattis.com/problems/flowerytrails 713 | Kattis | shortestpath1 | shortestpath1 | 4.4e | SSSP, Dijkstra, Easier | very standard Dijkstra's problem | 1470 | 3.5 | no | no | https://open.kattis.com/problems/shortestpath1 714 | Kattis | shortestpath2 | shortestpath2 | 4.4e | SSSP, Dijkstra, Easier | Dijkstra's with modification; edges only available periodically; be careful with P = 0 case | 423 | 3.9 | no | no | https://open.kattis.com/problems/shortestpath2 715 | Kattis | texassummers | texassummers | 4.4e | SSSP, Dijkstra, Easier | Dijkstra's; complete weighted graph; print path | 97 | 4.0 | no | no | https://open.kattis.com/problems/texassummers 716 | UVa | 00589 | | 4.4g | SSSP, Dijkstra, Harder | weighted SSSP: move box from s to t + unweighted SSSP: move player to correct position to push the box | - | 0.0 | no | no | https://onlinejudge.org/external/5/589.pdf 717 | UVa | 12047 | | 4.4g | SSSP, Dijkstra, Harder | clever usage of Dijkstra's; run Dijkstra's from source and from d from destination | - | 0.0 | no | no | https://onlinejudge.org/external/120/12047.pdf 718 | UVa | 12950 | | 4.4g | SSSP, Dijkstra, Harder | clever usage of Dijstra's; instead of extending by one edge, we can extend by two edges at a time | - | 0.0 | no | no | https://onlinejudge.org/external/129/12950.pdf 719 | Kattis | blockcrusher | blockcrusher | 4.4g | SSSP, Dijkstra, Harder | Dijkstra's from top row to bottom row (or vice versa); print path | 257 | 5.1 | no | no | https://open.kattis.com/problems/blockcrusher 720 | Kattis | emptyingbaltic | emptyingbaltic | 4.4g | SSSP, Dijkstra, Harder | Dijkstra's variant; grow spanning tree from drain/source | 287 | 5.4 | no | no | https://open.kattis.com/problems/emptyingbaltic 721 | Kattis | invasion | invasion | 4.4g | SSSP, Dijkstra, Harder | SSSP with multiple and successive sources; multiple calls of Dijkstra's (gets lighter each time if pruned properly) | 46 | 4.3 | no | no | https://open.kattis.com/problems/invasion 722 | Kattis | visualgo | visualgo | 4.4g | 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 | no | no | https://open.kattis.com/problems/visualgo 723 | UVa | 00558 | | 4.4h | SSSP, Bellman-Ford | check if negative cycle exists | - | 0.0 | no | no | https://onlinejudge.org/external/5/558.pdf 724 | UVa | 10449 | | 4.4h | SSSP, Bellman-Ford | find the minimum weight path; which may be negative; be careful: INF negative weight is lower than INF | - | 0.0 | no | no | https://onlinejudge.org/external/104/10449.pdf 725 | UVa | 12768 | | 4.4h | SSSP, Bellman-Ford | insert -F as edge weight; see if negative cycle exists; or find min SSSP value from s = 1 | - | 0.0 | no | no | https://onlinejudge.org/external/127/12768.pdf 726 | Kattis | hauntedgraveyard | hauntedgraveyard | 4.4h | SSSP, Bellman-Ford | Bellman-Ford; negative cycle check needed | 95 | 8.2 | no | no | https://open.kattis.com/problems/hauntedgraveyard 727 | LeetCode | lc0743 | Network Delay Time | 4.4h | SSSP, Bellman-Ford | SSSP on a small directed weighted graph | 0 | 4.0 | yes | no | https://leetcode.com/problems/network-delay-time/ 728 | Kattis | shortestpath3 | shortestpath3 | 4.4h | SSSP, Bellman-Ford | Bellman-Ford; do DFS/BFS from vertices that are part of any negative cycle | 524 | 5.1 | no | no | https://open.kattis.com/problems/shortestpath3 729 | Kattis | xyzzy | xyzzy | 4.4h | SSSP, Bellman-Ford | check 'positive' cycle; check connectedness; also available at UVa 10557 | 152 | 6.7 | no | no | https://open.kattis.com/problems/xyzzy 730 | UVa | 00821 | | 4.5a | APSP, Standard | LA 5221 - WorldFinals Orlando00; one of the easiest ICPC WorldFinals problem | - | 0.0 | no | no | https://onlinejudge.org/external/8/821.pdf 731 | UVa | 01247 | | 4.5a | APSP, Standard | LA 4524 - Hsinchu09; Floyd-Warshall with modification: prefer shortest path with less intermediate vertices | - | 0.0 | no | no | https://onlinejudge.org/external/12/1247.pdf 732 | UVa | 10354 | | 4.5a | APSP, Standard | find and remove edges involved in boss's shortest paths; re-run shortest paths from home to market | - | 0.0 | no | no | https://onlinejudge.org/external/103/10354.pdf 733 | Kattis | allpairspath | allpairspath | 4.5a | APSP, Standard | basic Floyd-Warshall; tricky negative cycle checks | 772 | 5.5 | no | no | https://open.kattis.com/problems/allpairspath 734 | Kattis | importspaghetti | importspaghetti | 4.5a | APSP, Standard | smallest cycle; print path by breaking the self-loop into i - other vertex j - i | 292 | 5.1 | no | no | https://open.kattis.com/problems/importspaghetti 735 | LeetCode | lc1334 | Find the City With the Smallest Number of Neighbors at a Threshold Distance | 4.5a | APSP, Standard | get APSP information using Floyd-Warshall; compute reachability; get the answer | 0 | 4.0 | yes | no | https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/ 736 | Kattis | 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 | no | no | https://open.kattis.com/problems/transportationplanning 737 | UVa | 01056 | | 4.5b | APSP, Variants | LA 3569 - WorldFinals SanAntonio06; finding diameter of a small graph with Floyd-Warshall | - | 0.0 | no | no | https://onlinejudge.org/external/10/1056.pdf 738 | UVa | 10342 | | 4.5b | APSP, Variants | Floyd-Warshall to get APSP values; to get the second best shortest path, try to make a single mistake | - | 0.0 | no | no | https://onlinejudge.org/external/103/10342.pdf 739 | UVa | 10987 | | 4.5b | APSP, Variants | creative usage of Floyd-Warshall algorithm; if we can detour without increasing cost, then delete the direct edge | - | 0.0 | no | no | https://onlinejudge.org/external/109/10987.pdf 740 | Kattis | arbitrage | arbitrage | 4.5b | APSP, Variants | arbitrage problem; similar to UVa 00104 and 00436 | 324 | 3.3 | no | no | https://open.kattis.com/problems/arbitrage 741 | Kattis | kastenlauf | kastenlauf | 4.5b | APSP, Variants | n ≤ 100; Warshall's transitive closure problem | 713 | 3.8 | no | no | https://open.kattis.com/problems/kastenlauf 742 | Kattis | secretchamber | secretchamber | 4.5b | APSP, Variants | LA 8047 - WorldFinals RapidCity17; Warshall's transitive closure; also available at UVa 01757 - Secret Chamber ... | 1187 | 2.2 | no | no | https://open.kattis.com/problems/secretchamber 743 | UVa | 00452 | | 4.7a | S/Longest Paths on DAG | LONGEST-PATH on DAG | - | 0.0 | no | no | https://onlinejudge.org/external/4/452.pdf 744 | UVa | 10350 | | 4.7a | S/Longest Paths on DAG | shortest paths; implicit DAG; DP | - | 0.0 | no | no | https://onlinejudge.org/external/103/10350.pdf 745 | Kattis | fibtour | fibtour | 4.7a | 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 | no | no | https://open.kattis.com/problems/fibtour 746 | LeetCode | lc0064 | Minimum Path Sum | 4.7a | S/Longest Paths on DAG | basic SSSP on DAG; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/minimum-path-sum/ 747 | Kattis | mravi | mravi | 4.7a | 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 | no | no | https://open.kattis.com/problems/mravi 748 | Kattis | safepassage | safepassage | 4.7a | 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 | no | no | https://open.kattis.com/problems/safepassage 749 | UVa | 10544 | | 4.7b | Counting Paths, Easier | counting paths in implicit DAG | - | 0.0 | no | no | https://onlinejudge.org/external/105/10544.pdf 750 | UVa | 11569 | | 4.7b | Counting Paths, Easier | determine the length of one of the longest paths and then count the number of such longest paths in DAG | - | 0.0 | no | no | https://onlinejudge.org/external/115/11569.pdf 751 | Kattis | compositions | compositions | 4.7b | Counting Paths, Easier | LA 7365 - Greater NY15; s: (N_left); t: try all values, skip some numbers | 160 | 2.3 | no | no | https://open.kattis.com/problems/compositions 752 | LeetCode | lc0062 | Unique Paths | 4.7b | Counting Paths, Easier | counting paths; DAG; leetcode-75; top-100-liked | 0 | 4.0 | yes | yes | https://leetcode.com/problems/unique-paths/ 753 | Kattis | robotsonagrid | robotsonagrid | 4.7b | Counting Paths, Easier | counting paths in implicit DAG | 147 | 4.3 | no | no | https://open.kattis.com/problems/robotsonagrid 754 | Kattis | runningsteps | runningsteps | 4.7b | 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 | no | no | https://open.kattis.com/problems/runningsteps 755 | Kattis | scenes | scenes | 4.7b | 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 | no | no | https://open.kattis.com/problems/scenes 756 | UVa | 00590 | | 4.7c | Conversion to DAG | s: (pos; day_left) | - | 0.0 | no | no | https://onlinejudge.org/external/5/590.pdf 757 | UVa | 10913 | | 4.7c | Conversion to DAG | s: (r; c; neg_left; stat); t: down/(left/right) | - | 0.0 | no | no | https://onlinejudge.org/external/109/10913.pdf 758 | UVa | 12875 | | 4.7c | Conversion to DAG | LA 6853 - Bangkok14; similar to UVa 10702; s: (cur_store; cur_concert); t: pick any next store for next concert | - | 0.0 | no | no | https://onlinejudge.org/external/128/12875.pdf 759 | Kattis | cardmagic | cardmagic | 4.7c | Conversion to DAG | s: (deck, tgt_left); t: val 1 to K ≤ tgt_left | 133 | 3.9 | no | no | https://open.kattis.com/problems/cardmagic 760 | Kattis | drinkresponsibly | drinkresponsibly | 4.7c | Conversion to DAG | s: (cur_drink, money_left, u_left); be careful with precision errors; print solution | 98 | 4.2 | no | no | https://open.kattis.com/problems/drinkresponsibly 761 | Kattis | maximizingwinnings | maximizingwinnings | 4.7c | Conversion to DAG | separate the maximizing and minimizing problem; s: (cur_room, turns_left); t: go to other room or stay | 193 | 3.9 | no | no | https://open.kattis.com/problems/maximizingwinnings 762 | UVa | 00536 | | 4.7d | Tree | reconstructing binary tree from preorder and inorder binary tree traversal | - | 0.0 | no | no | https://onlinejudge.org/external/5/536.pdf 763 | UVa | 11695 | | 4.7d | Tree | cut the worst edge along the tree diameter; link two centers; also available at Kattis - flight | - | 0.0 | no | no | https://onlinejudge.org/external/116/11695.pdf 764 | UVa | 12347 | | 4.7d | Tree | given pre-order traversal of a BST; use BST property to get the BST; output the post-order traversal that BST | - | 0.0 | no | no | https://onlinejudge.org/external/123/12347.pdf 765 | UVa | 12379 | | 4.7d | Tree | find the diameter of tree first; we only traverse the diameter once and we traverse the other edges twice | - | 0.0 | no | no | https://onlinejudge.org/external/123/12379.pdf 766 | Kattis | adjoin | adjoin | 4.7d | Tree | the key parts are finding tree diameter and its center (along that diameter); also see UVa 11695 | 373 | 5.3 | no | no | https://open.kattis.com/problems/adjoin 767 | Kattis | flight | flight | 4.7d | Tree | cut the worst edge along the tree diameter; link two centers; also available at UVa 11695 - Flight Planning | 46 | 6.3 | no | no | https://open.kattis.com/problems/flight 768 | LeetCode | lc1466 | Reorder Routes to Make All Paths Lead to the City Zero | 4.7d | Tree | create undirected tree; traverse from the root 0 to identify the answers; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero/ 769 | Kattis | tourists | tourists | 4.7d | Tree | APSP on Tree (special requirements); LCA | 431 | 3.8 | no | no | https://open.kattis.com/problems/tourists 770 | UVa | 00670 | | 4.7e | Bipartite Graph | MCBM | - | 0.0 | no | no | https://onlinejudge.org/external/6/670.pdf 771 | UVa | 11138 | | 4.7e | Bipartite Graph | a pure MCBM problem | - | 0.0 | no | no | https://onlinejudge.org/external/111/11138.pdf 772 | UVa | 12644 | | 4.7e | Bipartite Graph | classic MCBM problem wrapped inside a creative problem statement | - | 0.0 | no | no | https://onlinejudge.org/external/126/12644.pdf 773 | UVa | 12668 | | 4.7e | Bipartite Graph | LA 6525 - LatinAmerica13; split rows/columns due to the presence of pawns; then run MCBM | - | 0.0 | no | no | https://onlinejudge.org/external/126/12668.pdf 774 | Kattis | bookclub | bookclub | 4.7e | Bipartite Graph | check if perfect MCBM is possible | 307 | 4.5 | no | no | https://open.kattis.com/problems/bookclub 775 | Kattis | escapeplan | escapeplan | 4.7e | Bipartite Graph | left set: robots; right set: holes; 3 version of similar bipartite graphs; MCBM | 98 | 5.7 | no | no | https://open.kattis.com/problems/escapeplan 776 | Kattis | flippingcards | flippingcards | 4.7e | Bipartite Graph | left set: n card numbers; right set: 2*n picture numbers; possible if MCBM = n; need fast algorithm | 169 | 7.0 | no | no | https://open.kattis.com/problems/flippingcards 777 | UVa | 00291 | | 4.7f | Eulerian Graph | Euler tour on a small graph; backtracking is sufficient | - | 0.0 | no | no | https://onlinejudge.org/external/2/291.pdf 778 | UVa | 10054 | | 4.7f | Eulerian Graph | printing the Euler tour | - | 0.0 | no | no | https://onlinejudge.org/external/100/10054.pdf 779 | UVa | 10203 | | 4.7f | Eulerian Graph | the underlying graph is Euler graph | - | 0.0 | no | no | https://onlinejudge.org/external/102/10203.pdf 780 | UVa | 10596 | | 4.7f | Eulerian Graph | Euler Graph property check | - | 0.0 | no | no | https://onlinejudge.org/external/105/10596.pdf 781 | Kattis | catenyms | catenyms | 4.7f | Eulerian Graph | Euler graph property check; 26 vertices; directed non simple graph; printing the Euler tour in lexicographic order | 67 | 7.1 | no | no | https://open.kattis.com/problems/catenyms 782 | Kattis | eulerianpath | eulerianpath | 4.7f | Eulerian Graph | Euler graph property check; directed graph; printing the Euler tour | 219 | 5.6 | no | no | https://open.kattis.com/problems/eulerianpath 783 | Kattis | railroad2 | railroad2 | 4.7f | 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 | no | no | https://open.kattis.com/problems/railroad2 784 | LeetCode | lc0102 | Binary Tree Level Order Traversal | 4.7g | BT Exercises, H | BFS; expand frontier; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/binary-tree-level-order-traversal/ 785 | LeetCode | lc0111 | Minimum Depth of Binary Tree | 4.7g | BT Exercises, H | BFS until there is a leaf | 0 | 2.0 | yes | yes | https://leetcode.com/problems/minimum-depth-of-binary-tree/ 786 | LeetCode | lc0199 | Binary Tree Right Side View | 4.7g | BT Exercises, H | BFS; last item per level; leetcode-75; top-100-liked; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/binary-tree-right-side-view/ 787 | LeetCode | lc0429 | N-ary Tree Level Order Traversal | 4.7g | BT Exercises, H | BFS on n-ary tree | 0 | 4.0 | yes | no | https://leetcode.com/problems/n-ary-tree-level-order-traversal/ 788 | LeetCode | lc1161 | Maximum Level Sum of a Binary Tree | 4.7g | BT Exercises, H | BFS; max level sum; leetcode-75 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/ 789 | LeetCode | lc1609 | Even Odd Tree | 4.7g | BT Exercises, H | BFS; with custom ordering rules | 0 | 4.0 | yes | no | https://leetcode.com/problems/even-odd-tree/ 790 | UVa | 12004 | | 5.2a | Finding Formula, Easier | try small n; get the pattern; use long long | - | 0.0 | no | no | https://onlinejudge.org/external/120/12004.pdf 791 | UVa | 12918 | | 5.2a | Finding Formula, Easier | sum of arithmetic progression; long long | - | 0.0 | no | no | https://onlinejudge.org/external/129/12918.pdf 792 | Kattis | averageshard | averageshard | 5.2a | Finding Formula, Easier | find O(n) formula; also see Kattis - averageseasy | 605 | 2.6 | no | no | https://open.kattis.com/problems/averageshard 793 | Kattis | bishops | bishops | 5.2a | Finding Formula, Easier | chess pattern involving bishops; from IPSC 2004 | 1185 | 2.2 | no | no | https://open.kattis.com/problems/bishops 794 | Kattis | crne | crne | 5.2a | Finding Formula, Easier | simulate cutting process on small numbers; get formula | 477 | 2.5 | no | no | https://open.kattis.com/problems/crne 795 | LeetCode | lc1523 | Count Odd Numbers in an Interval Range | 5.2a | Finding Formula, Easier | simple formula; inclusion-exclusion; programming-skills | 0 | 2.0 | yes | yes | https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/ 796 | LeetCode | lc2413 | Smallest Even Multiple | 5.2a | Finding Formula, Easier | a simple number theory; n or 2n | 0 | 2.0 | yes | yes | https://leetcode.com/problems/smallest-even-multiple/ 797 | Kattis | twostones | twostones | 5.2a | Finding Formula, Easier | just check odd or even | 15317 | 1.3 | no | no | https://open.kattis.com/problems/twostones 798 | UVa | 10161 | | 5.2b | Finding Formula, Harder | sqrt and ceil | - | 0.0 | no | no | https://onlinejudge.org/external/101/10161.pdf 799 | UVa | 11038 | | 5.2b | Finding Formula, Harder | define a function f that counts the number of 0s from 1 to n; also available at Kattis - howmanyzeros | - | 0.0 | no | no | https://onlinejudge.org/external/110/11038.pdf 800 | UVa | 11718 | | 5.2b | Finding Formula, Harder | convert loops to a closed form formula; use modPow to compute the results | - | 0.0 | no | no | https://onlinejudge.org/external/117/11718.pdf 801 | LeetCode | lc0781 | Rabbits in Forest | 5.2b | Finding Formula, Harder | count the answer frequencies; for each answer k, group the rabbits into size k+1 | 0 | 4.0 | yes | no | https://leetcode.com/problems/rabbits-in-forest/ 802 | Kattis | mortgage | mortgage | 5.2b | Finding Formula, Harder | geometric progression; divergent but finite; special case when r = 1.0 (no interest) | 51 | 7.9 | no | no | https://open.kattis.com/problems/mortgage 803 | Kattis | neighborhoodwatch | neighborhoodwatch | 5.2b | Finding Formula, Harder | sum of AP; inclusion-exclusion | 319 | 3.1 | no | no | https://open.kattis.com/problems/neighborhoodwatch 804 | Kattis | nine | nine | 5.2b | Finding Formula, Harder | find the required formula | 681 | 3.2 | no | no | https://open.kattis.com/problems/nine 805 | UVa | 00389 | | 5.2c | Base Number Conversion | use Java Integer class | - | 0.0 | no | no | https://onlinejudge.org/external/3/389.pdf 806 | UVa | 11952 | | 5.2c | Base Number Conversion | check base 2 to 18; special case for base 1 | - | 0.0 | no | no | https://onlinejudge.org/external/119/11952.pdf 807 | Kattis | allaboutthatbase | allaboutthatbase | 5.2c | Base Number Conversion | check base 1 to 36; base 1 is special; Big Integer | 927 | 2.9 | no | no | https://open.kattis.com/problems/allaboutthatbase 808 | Kattis | 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 | no | no | https://open.kattis.com/problems/arithmetic 809 | Kattis | basicremains | basicremains | 5.2c | Base Number Conversion | also involving Big Integer modulo; also available at UVa 10551 - Basic Remains | 174 | 3.4 | no | no | https://open.kattis.com/problems/basicremains 810 | LeetCode | lc0067 | Add Binary | 5.2c | Base Number Conversion | convert a and b from bin to dec; add them; convert back; programming-skills; top-interview-150 | 0 | 2.0 | yes | no | https://leetcode.com/problems/add-binary/ 811 | Kattis | oktalni | oktalni | 5.2c | Base Number Conversion | convert each 3-bits of binary strings to octal; Big Integer | 634 | 1.8 | no | no | https://open.kattis.com/problems/oktalni 812 | UVa | 00575 | | 5.2d | Base Number Variants | base modification | - | 0.0 | no | no | https://onlinejudge.org/external/5/575.pdf 813 | UVa | 10931 | | 5.2d | Base Number Variants | convert decimal to binary; count number of 1s | - | 0.0 | no | no | https://onlinejudge.org/external/109/10931.pdf 814 | UVa | 11121 | | 5.2d | Base Number Variants | search for the term 'negabinary' | - | 0.0 | no | no | https://onlinejudge.org/external/111/11121.pdf 815 | Kattis | aliennumbers | aliennumbers | 5.2d | Base Number Variants | source base to decimal; decimal to target base | 1050 | 2.1 | no | no | https://open.kattis.com/problems/aliennumbers 816 | Kattis | ignore | ignore | 5.2d | Base Number Variants | actually a base 7 conversion problem as only 7 digits are meaningful when rotated | 268 | 3.2 | no | no | https://open.kattis.com/problems/ignore 817 | LeetCode | lc2595 | Number of Even and Odd Bits | 5.2d | Base Number Variants | convert n from base 10 to 2; process | 0 | 2.0 | yes | no | https://leetcode.com/problems/number-of-even-and-odd-bits/ 818 | Kattis | mixedbasearithmetic | mixedbasearithmetic | 5.2d | Base Number Variants | mix of base 10 and two versions of base 26 | 54 | 5.9 | no | no | https://open.kattis.com/problems/mixedbasearithmetic 819 | UVa | 00443 | | 5.2e | Number Systems/Seqs | try all 2^i * 3^j * 5^k * 7^l; sort | - | 0.0 | no | no | https://onlinejudge.org/external/4/443.pdf 820 | UVa | 11970 | | 5.2e | Number Systems/Seqs | square numbers; divisibility; brute force | - | 0.0 | no | no | https://onlinejudge.org/external/119/11970.pdf 821 | Kattis | 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 | no | no | https://open.kattis.com/problems/candlebox 822 | Kattis | collatz | collatz | 5.2e | Number Systems/Seqs | similar to UVa 00694; just do as asked | 757 | 3.7 | no | no | https://open.kattis.com/problems/collatz 823 | LeetCode | lc3099 | Harshad Number | 5.2e | Number Systems/Seqs | compute sum of digits; check as asked | 0 | 2.0 | yes | no | https://leetcode.com/problems/harshad-number/ 824 | Kattis | permutedarithmeticsequence | permutedarithmeticsequence | 5.2e | Number Systems/Seqs | sort differences of adjacent items | 1262 | 2.0 | no | no | https://open.kattis.com/problems/permutedarithmeticsequence 825 | Kattis | rationalsequence | rationalsequence | 5.2e | Number Systems/Seqs | pattern finding; tree traversal on a special tree | 458 | 4.6 | no | no | https://open.kattis.com/problems/rationalsequence 826 | UVa | 11384 | | 5.2f | Log, Exp, Pow | find the smallest power of two greater than n; can be solved easily using ceil(eps log2(n)) | - | 0.0 | no | no | https://onlinejudge.org/external/113/11384.pdf 827 | UVa | 11847 | | 5.2f | Log, Exp, Pow | O(1) math formula exists: floor(log2(n)) | - | 0.0 | no | no | https://onlinejudge.org/external/118/11847.pdf 828 | Kattis | cokolada | cokolada | 5.2f | Log, Exp, Pow | the answers involve powers of two and a simulation | 605 | 2.2 | no | no | https://open.kattis.com/problems/cokolada 829 | Kattis | factstone | factstone | 5.2f | Log, Exp, Pow | use logarithm; power; also available at UVa 10916 - Factstone Benchmark | 200 | 3.6 | no | no | https://open.kattis.com/problems/factstone 830 | LeetCode | lc0231 | Power of Two | 5.2f | Log, Exp, Pow | n ≤ 0 is False; log2 and exp test | 0 | 2.0 | yes | yes | https://leetcode.com/problems/power-of-two/ 831 | Kattis | lemonadetrade | lemonadetrade | 5.2f | Log, Exp, Pow | use log transformation technique; linear pass | 82 | 5.3 | no | no | https://open.kattis.com/problems/lemonadetrade 832 | Kattis | thebackslashproblem | thebackslashproblem | 5.2f | Log, Exp, Pow | actually power of two | 349 | 2.2 | no | no | https://open.kattis.com/problems/thebackslashproblem 833 | UVa | 00264 | | 5.2g | Grid | grid; pattern | - | 0.0 | no | no | https://onlinejudge.org/external/2/264.pdf 834 | UVa | 10022 | | 5.2g | Grid | this is not an SSSP problem; find the pattern in this grid (triangle)-like system | - | 0.0 | no | no | https://onlinejudge.org/external/100/10022.pdf 835 | UVa | 10182 | | 5.2g | Grid | grid | - | 0.0 | no | no | https://onlinejudge.org/external/101/10182.pdf 836 | UVa | 10233 | | 5.2g | Grid | the number of items in row forms arithmetic progression series; use hypot | - | 0.0 | no | no | https://onlinejudge.org/external/102/10233.pdf 837 | Kattis | 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 | no | no | https://open.kattis.com/problems/beehouseperimeter 838 | Kattis | honeyheist | honeyheist | 5.2g | Grid | transform the hexagonal grid input into 2D grid first; then run SSSP on unweighted graph; BFS | 135 | 3.8 | no | no | https://open.kattis.com/problems/honeyheist 839 | Kattis | maptiles2 | maptiles2 | 5.2g | Grid | simple conversion between two grid indexing systems | 1338 | 1.6 | no | no | https://open.kattis.com/problems/maptiles2 840 | UVa | 00930 | | 5.2h | Polynomial | Ruffini's rule; roots of quadratic eq | - | 0.0 | no | no | https://onlinejudge.org/external/9/930.pdf 841 | UVa | 10268 | | 5.2h | Polynomial | polynomial derivation; Horner's rule | - | 0.0 | no | no | https://onlinejudge.org/external/102/10268.pdf 842 | UVa | 10302 | | 5.2h | Polynomial | use long double | - | 0.0 | no | no | https://onlinejudge.org/external/103/10302.pdf 843 | UVa | 10586 | | 5.2h | Polynomial | compute number of prime factors of each integer in the desired range; use 1D RSQ DP; binary search | - | 0.0 | no | no | https://onlinejudge.org/external/105/10586.pdf 844 | Kattis | ada | ada | 5.2h | Polynomial | polynomial problem; apply the given procedure recursively | 346 | 2.8 | no | no | https://open.kattis.com/problems/ada 845 | Kattis | 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 | no | no | https://open.kattis.com/problems/curvyblocks 846 | Kattis | plot | plot | 5.2h | Polynomial | analyze the given pseudocode; the required pattern involves Binomial Coefficients | 210 | 2.5 | no | no | https://open.kattis.com/problems/plot 847 | UVa | 00332 | | 5.2i | Fractions | use GCD | - | 0.0 | no | no | https://onlinejudge.org/external/3/332.pdf 848 | UVa | 00834 | | 5.2i | Fractions | do as asked | - | 0.0 | no | no | https://onlinejudge.org/external/8/834.pdf 849 | UVa | 12068 | | 5.2i | Fractions | involving fraction; use LCM and GCD | - | 0.0 | no | no | https://onlinejudge.org/external/120/12068.pdf 850 | Kattis | deadfraction | deadfraction | 5.2i | Fractions | try every single possible repeating decimals; also available at UVa 10555 - Dead Fraction | 153 | 4.9 | no | no | https://open.kattis.com/problems/deadfraction 851 | Kattis | fraction | fraction | 5.2i | Fractions | continued fraction to normal fraction and vice versa | 154 | 3.8 | no | no | https://open.kattis.com/problems/fraction 852 | Kattis | mixedfractions | mixedfractions | 5.2i | Fractions | convert fraction to mixed fraction | 5154 | 1.5 | no | yes | https://open.kattis.com/problems/mixedfractions 853 | Kattis | thermostat | thermostat | 5.2i | Fractions | convert one temperature to another; use fraction; use Java BigInteger; gcd | 81 | 3.4 | no | no | https://open.kattis.com/problems/thermostat 854 | UVa | 00496 | | 5.2j | Really Ad Hoc | set manipulation | - | 0.0 | no | no | https://onlinejudge.org/external/4/496.pdf 855 | UVa | 11241 | | 5.2j | Really Ad Hoc | the hardest case is computing Dew point given temperature and Humidex; derive it with Algebra | - | 0.0 | no | no | https://onlinejudge.org/external/112/11241.pdf 856 | UVa | 12036 | | 5.2j | Really Ad Hoc | use pigeon hole principle | - | 0.0 | no | no | https://onlinejudge.org/external/120/12036.pdf 857 | LeetCode | lc0598 | Range Addition II | 5.2j | Really Ad Hoc | keep the largest upper-left rectangle size | 0 | 2.0 | yes | no | https://leetcode.com/problems/range-addition-ii/ 858 | Kattis | matrix | matrix | 5.2j | Really Ad Hoc | use simple linear algebra; one special case when c = 0 | 784 | 3.1 | no | no | https://open.kattis.com/problems/matrix 859 | Kattis | trip | trip | 5.2j | Really Ad Hoc | be careful with precision error; also available at UVa 10137 - The Trip | 103 | 5.5 | no | no | https://open.kattis.com/problems/trip 860 | Kattis | yoda | yoda | 5.2j | Really Ad Hoc | ad hoc; 9 digits comparison | 1607 | 2.1 | no | no | https://open.kattis.com/problems/yoda 861 | UVa | 00543 | | 5.3a | Prime Numbers | sieve; complete search; Goldbach's conjecture; similar to UVa 00686, 10311, and 10948 | - | 0.0 | no | no | https://onlinejudge.org/external/5/543.pdf 862 | UVa | 01644 | | 5.3a | Prime Numbers | LA 3883 - Tokyo07; sieve; prime check; upper bound - lower bound | - | 0.0 | no | no | https://onlinejudge.org/external/16/1644.pdf 863 | UVa | 10650 | | 5.3a | Prime Numbers | 3 uni-distance consecutive primes | - | 0.0 | no | no | https://onlinejudge.org/external/106/10650.pdf 864 | Kattis | 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 | no | no | https://open.kattis.com/problems/enlarginghashtables 865 | Kattis | primesieve | primesieve | 5.3a | Prime Numbers | use sieve up to 10^8; it is fast enough | 865 | 4.5 | no | yes | https://open.kattis.com/problems/primesieve 866 | Kattis | reseto | reseto | 5.3a | Prime Numbers | sieve of Eratosthenes until the k-th crossing | 460 | 2.7 | no | yes | https://open.kattis.com/problems/reseto 867 | UVa | 01180 | | 5.3b | (Prob) Prime Testing | LA 2350 - Dhaka01; small prime check | - | 0.0 | no | no | https://onlinejudge.org/external/11/1180.pdf 868 | UVa | 01210 | | 5.3b | (Prob) Prime Testing | LA 3399 - Tokyo05; simple | - | 0.0 | no | no | https://onlinejudge.org/external/12/1210.pdf 869 | Kattis | flowergarden | flowergarden | 5.3b | (Prob) Prime Testing | Euclidean dist; small prime check; use isProbablePrime; simulation; faster solutions exist | 317 | 4.4 | no | no | https://open.kattis.com/problems/flowergarden 870 | Kattis | goldbach2 | goldbach2 | 5.3b | (Prob) Prime Testing | simple brute force problem; use isProbablePrime; faster solutions exist | 1219 | 2.7 | no | no | https://open.kattis.com/problems/goldbach2 871 | LeetCode | lc2614 | Prime In Diagonal | 5.3b | (Prob) Prime Testing | check primes (Java isProbablePrime works) along the diagonals | 0 | 2.0 | yes | no | https://leetcode.com/problems/prime-in-diagonal/ 872 | Kattis | 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 | no | no | https://open.kattis.com/problems/primes2 873 | Kattis | 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 | no | no | https://open.kattis.com/problems/pseudoprime 874 | UVa | 00583 | | 5.3c | Finding Prime Factors | basic factorization problem | - | 0.0 | no | no | https://onlinejudge.org/external/5/583.pdf 875 | UVa | 11466 | | 5.3c | Finding Prime Factors | use efficient sieve implementation to get the largest prime factors | - | 0.0 | no | no | https://onlinejudge.org/external/114/11466.pdf 876 | UVa | 12703 | | 5.3c | Finding Prime Factors | uses small Fibonacci numbers up to 40 and simple prime factorization as a and b can be non-primes | - | 0.0 | no | no | https://onlinejudge.org/external/127/12703.pdf 877 | UVa | 12805 | | 5.3c | Finding Prime Factors | prime check; primes of format 4m-1 and 4m plus 1; simple prime factorization | - | 0.0 | no | no | https://onlinejudge.org/external/128/12805.pdf 878 | Kattis | pascal | pascal | 5.3c | Finding Prime Factors | find lowest prime factor of N; special case: N = 1 | 351 | 3.8 | no | yes | https://open.kattis.com/problems/pascal 879 | Kattis | primalrepresentation | primalrepresentation | 5.3c | Finding Prime Factors | factorization problem; use sieve to avoid TLE; use long long; 231-1 is a prime | 258 | 5.4 | no | yes | https://open.kattis.com/problems/primalrepresentation 880 | Kattis | primereduction | primereduction | 5.3c | Finding Prime Factors | factorization problem | 465 | 3.9 | no | no | https://open.kattis.com/problems/primereduction 881 | UVa | 00294 | | 5.3d | Prime Factors Functions | numDiv(N) | - | 0.0 | no | no | https://onlinejudge.org/external/2/294.pdf 882 | UVa | 10179 | | 5.3d | Prime Factors Functions | EulerPhi(N) | - | 0.0 | no | yes | https://onlinejudge.org/external/101/10179.pdf 883 | UVa | 11353 | | 5.3d | Prime Factors Functions | numPF(N); sort variant | - | 0.0 | no | no | https://onlinejudge.org/external/113/11353.pdf 884 | UVa | 11728 | | 5.3d | Prime Factors Functions | sumDiv(N) | - | 0.0 | no | no | https://onlinejudge.org/external/117/11728.pdf 885 | Kattis | almostperfect | almostperfect | 5.3d | Prime Factors Functions | sumDiv(N)-N; minor variation | 1507 | 3.2 | no | no | https://open.kattis.com/problems/almostperfect 886 | Kattis | divisors | divisors | 5.3d | Prime Factors Functions | return numDiv(nCk); but do not compute nCk directly; work with its prime factors | 208 | 5.2 | no | no | https://open.kattis.com/problems/divisors 887 | Kattis | relatives | relatives | 5.3d | Prime Factors Functions | EulerPhi(N); also available at UVa 10299 - Relatives | 231 | 3.8 | no | no | https://open.kattis.com/problems/relatives 888 | UVa | 10699 | | 5.3e | Modified Sieve | numDiffPF(N) for a range | - | 0.0 | no | no | https://onlinejudge.org/external/106/10699.pdf 889 | UVa | 10990 | | 5.3e | Modified Sieve | modified sieve to compute a range of Euler Phi values; use DP to compute depth Phi values; then finally use Max 1D Range... | - | 0.0 | no | no | https://onlinejudge.org/external/109/10990.pdf 890 | UVa | 11426 | | 5.3e | Modified Sieve | pre-calculate EulerPhi(N) | - | 0.0 | no | no | https://onlinejudge.org/external/114/11426.pdf 891 | UVa | 12043 | | 5.3e | Modified Sieve | sumDiv(N) and numDiv(N); brute force | - | 0.0 | no | no | https://onlinejudge.org/external/120/12043.pdf 892 | Kattis | 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 | no | no | https://open.kattis.com/problems/data 893 | Kattis | 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 | no | no | https://open.kattis.com/problems/farey 894 | Kattis | 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 | no | no | https://open.kattis.com/problems/nonprimefactors 895 | UVa | 10407 | | 5.3f | GCD and/or LCM | subtract the set s with s[0]; find gcd | - | 0.0 | no | no | https://onlinejudge.org/external/104/10407.pdf 896 | UVa | 11388 | | 5.3f | GCD and/or LCM | understand the relationship of GCD with LCM | - | 0.0 | no | no | https://onlinejudge.org/external/113/11388.pdf 897 | UVa | 11417 | | 5.3f | GCD and/or LCM | just use brute force as input is small | - | 0.0 | no | no | https://onlinejudge.org/external/114/11417.pdf 898 | Kattis | jackpot | jackpot | 5.3f | GCD and/or LCM | similar to Kattis - smallestmultiple; use Java BigInteger or other faster solutions | 379 | 3.2 | no | no | https://open.kattis.com/problems/jackpot 899 | LeetCode | lc3411 | Maximum Subarray With Equal Products | 5.3f | GCD and/or LCM | complete search; compute product, GCD, and LCM of all subarrays | 0 | 2.0 | yes | no | https://leetcode.com/problems/maximum-subarray-with-equal-products/ 900 | Kattis | prsteni | prsteni | 5.3f | GCD and/or LCM | GCD of first circle radius with subsequent circle radiuses | 993 | 1.6 | no | no | https://open.kattis.com/problems/prsteni 901 | Kattis | smallestmultiple | smallestmultiple | 5.3f | GCD and/or LCM | simple LCMs of all numbers; use Java BigInteger to be safe | 335 | 3.5 | no | no | https://open.kattis.com/problems/smallestmultiple 902 | UVa | 12335 | | 5.3g | Factorial | given the k-th permutation, recover the 1st permutation; use factorial; use Java BigInteger | - | 0.0 | no | no | https://onlinejudge.org/external/123/12335.pdf 903 | UVa | 12869 | | 5.3g | Factorial | LA 6847 - Bangkok 2014; every zero in factorial(n) is due to multiplication of factor 2 and 5; factor 2 grows faster tha... | - | 0.0 | no | no | https://onlinejudge.org/external/128/12869.pdf 904 | Kattis | inversefactorial | inversefactorial | 5.3g | Factorial | good problem; number of digits in factorial | 1059 | 5.3 | no | no | https://open.kattis.com/problems/inversefactorial 905 | Kattis | loworderzeros | loworderzeros | 5.3g | Factorial | last non zero digit of factorial; classic | 288 | 4.2 | no | no | https://open.kattis.com/problems/loworderzeros 906 | Kattis | namethatpermutation | namethatpermutation | 5.3g | Factorial | permutation number; involving factorial | 154 | 4.8 | no | no | https://open.kattis.com/problems/namethatpermutation 907 | Kattis | tutorial | tutorial | 5.3g | Factorial | factorial is just part of the problem; pruning | 1249 | 2.8 | no | no | https://open.kattis.com/problems/tutorial 908 | UVa | 10680 | | 5.3h | Working with PFs | use primefactors([1..N]) to get LCM(1; 2; ...; N) | - | 0.0 | no | no | https://onlinejudge.org/external/106/10680.pdf 909 | UVa | 11347 | | 5.3h | Working with PFs | prime-power factorization; numDiv(N) | - | 0.0 | no | no | https://onlinejudge.org/external/113/11347.pdf 910 | UVa | 11395 | | 5.3h | Working with PFs | key hint: a square number multiplied by powers of two; i.e. 2^k * i^2 for k >= 0; i >= 1 has odd sum of divisors | - | 0.0 | no | no | https://onlinejudge.org/external/113/11395.pdf 911 | Kattis | consecutivesums | consecutivesums | 5.3h | Working with PFs | work with factor; sum of Arithmetic Progression series | 239 | 5.2 | no | no | https://open.kattis.com/problems/consecutivesums 912 | Kattis | 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 | no | no | https://open.kattis.com/problems/factovisors 913 | Kattis | 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 | no | no | https://open.kattis.com/problems/iks 914 | LeetCode | lc0172 | Factorial Trailing Zeroes | 5.3h | Working with PFs | count number of prime factor 5; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/factorial-trailing-zeroes/ 915 | LeetCode | lc2761 | Prime Pairs With Target Sum | 5.3h | Working with PFs | sieve up to 1000; do prime tests | 0 | 4.0 | yes | no | https://leetcode.com/problems/prime-pairs-with-target-sum/ 916 | UVa | 10174 | | 5.3i | Modular Arithmetic | no Spinster number | - | 0.0 | no | no | https://onlinejudge.org/external/101/10174.pdf 917 | UVa | 10176 | | 5.3i | Modular Arithmetic | convert binary to decimal digit by digit; do modulo 131071 to the intermediate result | - | 0.0 | no | no | https://onlinejudge.org/external/101/10176.pdf 918 | UVa | 10212 | | 5.3i | Modular Arithmetic | multiply numbers from N down to N-M+1; use / 10 to discard the trailing zero(es); use % 1 Billion | - | 0.0 | no | no | https://onlinejudge.org/external/102/10212.pdf 919 | UVa | 10489 | | 5.3i | Modular Arithmetic | keep values small with modulo | - | 0.0 | no | no | https://onlinejudge.org/external/104/10489.pdf 920 | Kattis | anothercandies | anothercandies | 5.3i | Modular Arithmetic | simple modular arithmetic | 1843 | 2.7 | no | yes | https://open.kattis.com/problems/anothercandies 921 | Kattis | 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 | no | no | https://open.kattis.com/problems/ones 922 | Kattis | threedigits | threedigits | 5.3i | Modular Arithmetic | simulate factorial computation; remove trailing zeroes; keep many last few non-zero digits using modulo | 289 | 5.9 | no | no | https://open.kattis.com/problems/threedigits 923 | UVa | 10090 | | 5.3j | Extended Euclid | use solution for Linear Diophantine Equation | - | 0.0 | no | no | https://onlinejudge.org/external/100/10090.pdf 924 | UVa | 10104 | | 5.3j | Extended Euclid | pure Ext Euclid problem | - | 0.0 | no | no | https://onlinejudge.org/external/101/10104.pdf 925 | UVa | 10633 | | 5.3j | Extended Euclid | let C = N-M, N = 10a+b, and M = a; Linear Diophantine Equation: 9a+b = C | - | 0.0 | no | no | https://onlinejudge.org/external/106/10633.pdf 926 | UVa | 10673 | | 5.3j | Extended Euclid | uses Extended Euclidean | - | 0.0 | no | no | https://onlinejudge.org/external/106/10673.pdf 927 | Kattis | 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 | no | no | https://open.kattis.com/problems/candydistribution 928 | Kattis | modulararithmetic | modulararithmetic | 5.3j | Extended Euclid | the division operation requires modular inverse; use Extended Euclidean algorithm | 333 | 2.9 | no | no | https://open.kattis.com/problems/modulararithmetic 929 | Kattis | soyoulikeyourfoodhot | soyoulikeyourfoodhot | 5.3j | Extended Euclid | Linear Diophantine Equation; still solvable with brute force | 103 | 5.2 | no | no | https://open.kattis.com/problems/soyoulikeyourfoodhot 930 | UVa | 10922 | | 5.3k | Divisibility Test | test divisibility by 9 | - | 0.0 | no | no | https://onlinejudge.org/external/109/10922.pdf 931 | UVa | 10929 | | 5.3k | Divisibility Test | test divisibility by 11 | - | 0.0 | no | no | https://onlinejudge.org/external/109/10929.pdf 932 | UVa | 11344 | | 5.3k | Divisibility Test | use divisibility theory of [1..12] | - | 0.0 | no | no | https://onlinejudge.org/external/113/11344.pdf 933 | Kattis | divisible | divisible | 5.3k | Divisibility Test | divisibility; linear pass algorithm | 327 | 4.3 | no | no | https://open.kattis.com/problems/divisible 934 | LeetCode | lc1952 | Three Divisors | 5.3k | Divisibility Test | divisibility test up to sqrt of n | 0 | 2.0 | yes | yes | https://leetcode.com/problems/three-divisors/ 935 | Kattis | meowfactor | meowfactor | 5.3k | Divisibility Test | divisibility test of 9^ans; small range of ans | 310 | 3.5 | no | no | https://open.kattis.com/problems/meowfactor 936 | Kattis | thinkingofanumber | thinkingofanumber | 5.3k | Divisibility Test | simple range; use min/max properly; then small divisibility tests | 379 | 3.8 | no | no | https://open.kattis.com/problems/thinkingofanumber 937 | UVa | 00763 | | 5.4a | Fibonacci Numbers | Zeckendorf representation; greedy; Big Integer | - | 0.0 | no | no | https://onlinejudge.org/external/7/763.pdf 938 | UVa | 10689 | | 5.4a | Fibonacci Numbers | easy; Pisano period | - | 0.0 | no | no | https://onlinejudge.org/external/106/10689.pdf 939 | Kattis | anti11 | anti11 | 5.4a | Fibonacci Numbers | this problem degenerates into a modified Fibonacci numbers | 518 | 2.7 | no | no | https://open.kattis.com/problems/anti11 940 | Kattis | batmanacci | batmanacci | 5.4a | Fibonacci Numbers | Fibonacci; observation on N; Divide and Conquer | 331 | 3.8 | no | no | https://open.kattis.com/problems/batmanacci 941 | LeetCode | lc0070 | Climbing Stairs | 5.4a | Fibonacci Numbers | basically compute Fib(n+1); DP; top-100-liked; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/climbing-stairs/ 942 | LeetCode | lc1137 | N-th Tribonacci Number | 5.4a | Fibonacci Numbers | basic Tribonacci; DP; leetcode-75 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/n-th-tribonacci-number/ 943 | Kattis | rijeci | rijeci | 5.4a | Fibonacci Numbers | simple simulation with a single loop; Fibonacci | 2478 | 1.5 | no | no | https://open.kattis.com/problems/rijeci 944 | UVa | 00369 | | 5.4b | Binomial Coefficients | be careful with overflow issue | - | 0.0 | no | no | https://onlinejudge.org/external/3/369.pdf 945 | UVa | 10541 | | 5.4b | Binomial Coefficients | a good combinatorics problem | - | 0.0 | no | yes | https://onlinejudge.org/external/105/10541.pdf 946 | UVa | 11955 | | 5.4b | Binomial Coefficients | pure application; DP | - | 0.0 | no | no | https://onlinejudge.org/external/119/11955.pdf 947 | UVa | 12712 | | 5.4b | Binomial Coefficients | the answer is sum i=M to N of C(L*L;i)*i!; but simplify the computation of this formula instead of running it directly | - | 0.0 | no | no | https://onlinejudge.org/external/127/12712.pdf 948 | Kattis | election | election | 5.4b | Binomial Coefficients | compute the answers with help of binomial coefficients | 213 | 6.2 | no | no | https://open.kattis.com/problems/election 949 | LeetCode | lc0118 | Pascal's Triangle | 5.4b | Binomial Coefficients | basic bottom-up DP to generate Pascal's triangle; top-100-liked | 0 | 2.0 | yes | yes | https://leetcode.com/problems/pascals-triangle/ 950 | Kattis | lockedtreasure | lockedtreasure | 5.4b | Binomial Coefficients | the answer is nCm-1 | 321 | 2.8 | no | no | https://open.kattis.com/problems/lockedtreasure 951 | Kattis | oddbinom | oddbinom | 5.4b | Binomial Coefficients | OEIS A006046 | 245 | 3.5 | no | no | https://open.kattis.com/problems/oddbinom 952 | UVa | 10007 | | 5.4c | Catalan Numbers | answer is Cat(n) * n!; BigInteger | - | 0.0 | no | no | https://onlinejudge.org/external/100/10007.pdf 953 | UVa | 10223 | | 5.4c | Catalan Numbers | you can precalculate the answers as there are only 19 Catalan Numbers < 2^{32}-1 | - | 0.0 | no | no | https://onlinejudge.org/external/102/10223.pdf 954 | UVa | 10312 | | 5.4c | Catalan Numbers | number of binary bracketing = Cat(n); number of bracketing = Super-Catalan numbers | - | 0.0 | no | no | https://onlinejudge.org/external/103/10312.pdf 955 | Kattis | catalan | catalan | 5.4c | Catalan Numbers | basic Catalan Numbers | 521 | 3.6 | no | no | https://open.kattis.com/problems/catalan 956 | Kattis | catalansquare | catalansquare | 5.4c | Catalan Numbers | Catalan Numbers++; follow the description | 507 | 3.5 | no | no | https://open.kattis.com/problems/catalansquare 957 | Kattis | fiat | fiat | 5.4c | Catalan Numbers | N-th Catalan Number; use Fermat's little theorem | 75 | 6.7 | no | no | https://open.kattis.com/problems/fiat 958 | LeetCode | lc0096 | Unique Binary Search Trees | 5.4c | Catalan Numbers | Catalan numbers; pre-calculateable 1 to 19 | 0 | 4.0 | yes | no | https://leetcode.com/problems/unique-binary-search-trees/ 959 | UVa | 11310 | | 5.4d | Others, Easier | requires DP: let dp[i] be the number of ways the cakes can be packed for a box 2*i | - | 0.0 | no | no | https://onlinejudge.org/external/113/11310.pdf 960 | UVa | 11401 | | 5.4d | Others, Easier | spot the pattern | - | 0.0 | no | no | https://onlinejudge.org/external/114/11401.pdf 961 | UVa | 11597 | | 5.4d | Others, Easier | uses knowledge of graph theory; the answer is very trivial | - | 0.0 | no | no | https://onlinejudge.org/external/115/11597.pdf 962 | UVa | 12463 | | 5.4d | Others, Easier | double the socks and the shoes to simplify the problem | - | 0.0 | no | no | https://onlinejudge.org/external/124/12463.pdf 963 | Kattis | character | character | 5.4d | Others, Easier | OEIS A000295 | 841 | 2.4 | no | no | https://open.kattis.com/problems/character 964 | Kattis | honey | honey | 5.4d | Others, Easier | OEIS A002898 | 415 | 2.4 | no | no | https://open.kattis.com/problems/honey 965 | Kattis | 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 | no | no | https://open.kattis.com/problems/integerdivision 966 | LeetCode | lc1175 | Prime Arrangements | 5.4d | Others, Easier | let k be number of primes up to n; output k! * (n-k)!, mod 10^9+7 | 0 | 2.0 | yes | no | https://leetcode.com/problems/prime-arrangements/ 967 | UVa | 01224 | | 5.4e | Others, Harder | LA 3904 - Seoul07; derive formula from observing the small instances first | - | 0.0 | no | no | https://onlinejudge.org/external/12/1224.pdf 968 | UVa | 10784 | | 5.4e | Others, Harder | the number of diagonals in n-gon = n*(n-3)/2; use it to derive the solution | - | 0.0 | no | no | https://onlinejudge.org/external/107/10784.pdf 969 | UVa | 11069 | | 5.4e | Others, Harder | use Dynamic Programming | - | 0.0 | no | no | https://onlinejudge.org/external/110/11069.pdf 970 | UVa | 11538 | | 5.4e | Others, Harder | count along rows; columns; and diagonals | - | 0.0 | no | no | https://onlinejudge.org/external/115/11538.pdf 971 | Kattis | anagramcounting | anagramcounting | 5.4e | Others, Harder | use Big Integer | 1117 | 3.1 | no | no | https://open.kattis.com/problems/anagramcounting 972 | Kattis | incognito | incognito | 5.4e | Others, Harder | count frequencies; combinatorics; minus one | 791 | 2.7 | no | no | https://open.kattis.com/problems/incognito 973 | Kattis | tritiling | tritiling | 5.4e | Others, Harder | there are two related recurrences here; also available at UVa 10918 - Tri Tiling | 465 | 2.1 | no | no | https://open.kattis.com/problems/tritiling 974 | UVa | 01636 | | 5.5a | Probability, Easier | LA 4596 - NorthEasternEurope09; ad hoc probability question, one tricky special case involving all zeroes | - | 0.0 | no | no | https://onlinejudge.org/external/16/1636.pdf 975 | UVa | 10238 | | 5.5a | Probability, Easier | DP; s: (dice_left, score); try F values; Big Integer; no need to simplify the fraction; see UVa 10759 | - | 0.0 | no | no | https://onlinejudge.org/external/102/10238.pdf 976 | UVa | 10491 | | 5.5a | Probability, Easier | two ways to get a car: either pick a cow first; then switch to a car; or pick a car first; and then switch to another ca... | - | 0.0 | no | no | https://onlinejudge.org/external/104/10491.pdf 977 | UVa | 11181 | | 5.5a | Probability, Easier | iterative brute force; try all possibilities | - | 0.0 | no | no | https://onlinejudge.org/external/111/11181.pdf 978 | Kattis | bobby | bobby | 5.5a | Probability, Easier | computation of expected value | 618 | 2.8 | no | no | https://open.kattis.com/problems/bobby 979 | Kattis | 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 | no | no | https://open.kattis.com/problems/dicebetting 980 | Kattis | odds | odds | 5.5a | Probability, Easier | complete search; simple probability | 142 | 2.5 | no | no | https://open.kattis.com/problems/odds 981 | UVa | 10056 | | 5.5b | Probability, Harder | get the closed form formula | - | 0.0 | no | no | https://onlinejudge.org/external/100/10056.pdf 982 | UVa | 10648 | | 5.5b | Probability, Harder | DP; s: (rem_boxes; num_empty) | - | 0.0 | no | no | https://onlinejudge.org/external/106/10648.pdf 983 | UVa | 11176 | | 5.5b | Probability, Harder | DP, s: (rem_games, streak); t: lose this game, or win the next W = [1..n] games and lose the (W+1)-th game | - | 0.0 | no | no | https://onlinejudge.org/external/111/11176.pdf 984 | UVa | 11628 | | 5.5b | Probability, Harder | p[i] = ticket bought by i at the last round/total tickets bought at the last round by all n; gcd | - | 0.0 | no | no | https://onlinejudge.org/external/116/11628.pdf 985 | Kattis | 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 | no | no | https://open.kattis.com/problems/anthony 986 | Kattis | goodcoalition | goodcoalition | 5.5b | Probability, Harder | DP probability; like KNAPSACK | 276 | 3.4 | no | no | https://open.kattis.com/problems/goodcoalition 987 | Kattis | 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 | no | no | https://open.kattis.com/problems/lostinthewoods 988 | UVa | 00350 | | 5.6a | Cycle Finding | very basic cycle-finding problem; simply run Floyd's cycle-finding algorithm | - | 0.0 | no | no | https://onlinejudge.org/external/3/350.pdf 989 | UVa | 11036 | | 5.6a | Cycle Finding | cycle-finding; evaluate Reverse Polish f with a stack | - | 0.0 | no | no | https://onlinejudge.org/external/110/11036.pdf 990 | UVa | 11053 | | 5.6a | Cycle Finding | cycle-finding; the answer is N-lambda | - | 0.0 | no | no | https://onlinejudge.org/external/110/11053.pdf 991 | Kattis | fibonaccicycles | fibonaccicycles | 5.6a | Cycle Finding | detect cycle of fib(n)%k using fast data structure | 118 | 3.2 | no | no | https://open.kattis.com/problems/fibonaccicycles 992 | LeetCode | lc0287 | Find the Duplicate Number | 5.6a | Cycle Finding | find μ, start of the cycle; Floyd's cycle-finding algorithm; popularized by Joma Tech YouTube video; top-100-liked | 0 | 4.0 | yes | yes | https://leetcode.com/problems/find-the-duplicate-number/ 993 | Kattis | rats | rats | 5.6a | Cycle Finding | string processing plus cycle-finding; unordered_set | 92 | 6.3 | no | no | https://open.kattis.com/problems/rats 994 | UVa | 10111 | | 5.7a | Game Theory (Basic) | Tic-Tac-Toe; minimax; backtracking | - | 0.0 | no | no | https://onlinejudge.org/external/101/10111.pdf 995 | UVa | 10536 | | 5.7a | Game Theory (Basic) | model the 4*4 board and 48 possible pins as bitmask; then this is a simple two player game | - | 0.0 | no | no | https://onlinejudge.org/external/105/10536.pdf 996 | Kattis | bachetsgame | bachetsgame | 5.7a | Game Theory (Basic) | 2 players game; Dynamic Programming; also available at UVa 10404 - Bachet's Game | 724 | 2.1 | no | no | https://open.kattis.com/problems/bachetsgame 997 | Kattis | 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 | no | no | https://open.kattis.com/problems/blockgame2 998 | Kattis | euclidsgame | euclidsgame | 5.7a | Game Theory (Basic) | minimax; backtracking; also available at UVa 10368 - Euclid's Game | 199 | 4.8 | no | no | https://open.kattis.com/problems/euclidsgame 999 | LeetCode | lc3360 | Stone Removal Game | 5.7a | Game Theory (Basic) | simulate the process to determine the winner | 0 | 2.0 | yes | no | https://leetcode.com/problems/stone-removal-game/ 1000 | Kattis | 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 | no | no | https://open.kattis.com/problems/linije 1001 | UVa | 10229 | | 5.8a | Matrix Power | Fibonacci; modPow | - | 0.0 | no | no | https://onlinejudge.org/external/102/10229.pdf 1002 | UVa | 10655 | | 5.8a | Matrix Power | derive the square matrix | - | 0.0 | no | no | https://onlinejudge.org/external/106/10655.pdf 1003 | UVa | 12796 | | 5.8a | Matrix Power | count the number of paths of length L in an undirected graph where L can be up to 2^30 | - | 0.0 | no | no | https://onlinejudge.org/external/127/12796.pdf 1004 | Kattis | checkingforcorrectness | checkingforcorrectness | 5.8a | Matrix Power | Java Big Integer; one subtask uses modPow | 244 | 4.1 | no | no | https://open.kattis.com/problems/checkingforcorrectness 1005 | LeetCode | lc0050 | Pow(x, n) | 5.8a | Matrix Power | D&C exponentiation; programming-skills; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/powx-n/ 1006 | Kattis | porpoises | porpoises | 5.8a | Matrix Power | Fibonacci; matrix power; modulo | 268 | 2.9 | no | no | https://open.kattis.com/problems/porpoises 1007 | Kattis | 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 | no | no | https://open.kattis.com/problems/squawk 1008 | UVa | 00213 | | 6.2a | Cipher, Harder | LA 5152 - WorldFinals SanAntonio91 | - | 0.0 | no | no | https://onlinejudge.org/external/2/213.pdf 1009 | UVa | 00554 | | 6.2a | Cipher, Harder | try all shifts; output formatting | - | 0.0 | no | no | https://onlinejudge.org/external/5/554.pdf 1010 | UVa | 11385 | | 6.2a | Cipher, Harder | string manipulation and Fibonacci | - | 0.0 | no | no | https://onlinejudge.org/external/113/11385.pdf 1011 | Kattis | crackingthecode | crackingthecode | 6.2a | Cipher, Harder | one corner case involving the 25th to 26th character determination | 48 | 6.4 | no | no | https://open.kattis.com/problems/crackingthecode 1012 | Kattis | itsasecret | itsasecret | 6.2a | Cipher, Harder | playfair cipher; 2D array; quite tedious | 81 | 5.9 | no | no | https://open.kattis.com/problems/itsasecret 1013 | Kattis | playfair | playfair | 6.2a | Cipher, Harder | follow the description; a bit tedious; also available at UVa 11697 - Playfair Cipher | 156 | 2.5 | no | no | https://open.kattis.com/problems/playfair 1014 | Kattis | progressivescramble | progressivescramble | 6.2a | Cipher, Harder | the encode part is trivial; the decode part requires a bit of thinking | 977 | 2.1 | no | no | https://open.kattis.com/problems/progressivescramble 1015 | Kattis | textencryption | textencryption | 6.2a | Cipher, Harder | convert input alphabets to UPPERCASEs; loop | 305 | 3.2 | no | no | https://open.kattis.com/problems/textencryption 1016 | UVa | 11070 | | 6.2b | Input Parsing (Rec) | recursive grammar evaluation | - | 0.0 | no | no | https://onlinejudge.org/external/110/11070.pdf 1017 | UVa | 11291 | | 6.2b | Input Parsing (Rec) | recursive grammar check | - | 0.0 | no | no | https://onlinejudge.org/external/112/11291.pdf 1018 | Kattis | calculator | calculator | 6.2b | Input Parsing (Rec) | recursive parser and evaluator | 351 | 3.3 | no | no | https://open.kattis.com/problems/calculator 1019 | Kattis | otpor | otpor | 6.2b | Input Parsing (Rec) | parallel vs series evaluation; write a recursive parser; or use linear pass with stack | 94 | 4.3 | no | no | https://open.kattis.com/problems/otpor 1020 | Kattis | polish | polish | 6.2b | Input Parsing (Rec) | recursive parser | 224 | 3.3 | no | no | https://open.kattis.com/problems/polish 1021 | Kattis | subexpression | subexpression | 6.2b | Input Parsing (Rec) | recursive parsing; use DP; similar to https://visualgo.net/en/recursion tree versus DAG | 44 | 5.9 | no | no | https://open.kattis.com/problems/subexpression 1022 | UVa | 00494 | | 6.2c | Regular Expression | trivial with regex | - | 0.0 | no | no | https://onlinejudge.org/external/4/494.pdf 1023 | UVa | 00576 | | 6.2c | Regular Expression | solvable with regex | - | 0.0 | no | no | https://onlinejudge.org/external/5/576.pdf 1024 | UVa | 10058 | | 6.2c | Regular Expression | solvable with regex | - | 0.0 | no | no | https://onlinejudge.org/external/100/10058.pdf 1025 | Kattis | apaxiaaans | apaxiaaans | 6.2c | Regular Expression | solvable with regex | 6751 | 1.4 | no | no | https://open.kattis.com/problems/apaxiaaans 1026 | Kattis | hidden | hidden | 6.2c | Regular Expression | just a careful 1D array manipulation; we can also use regex | 1100 | 2.3 | no | no | https://open.kattis.com/problems/hidden 1027 | Kattis | 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 | no | no | https://open.kattis.com/problems/lindenmayorsystem 1028 | UVa | 11403 | | 6.2d | Output Formatting, H | similar with UVa 00338; tedious | - | 0.0 | no | no | https://onlinejudge.org/external/114/11403.pdf 1029 | UVa | 12155 | | 6.2d | Output Formatting, H | LA 4403 - KualaLumpur08; use proper index manipulation | - | 0.0 | no | no | https://onlinejudge.org/external/121/12155.pdf 1030 | Kattis | asciifigurerotation | asciifigurerotation | 6.2d | Output Formatting, H | rotate the input 90 degrees clockwise; remove trailing whitespaces; tedious | 521 | 3.5 | no | no | https://open.kattis.com/problems/asciifigurerotation 1031 | Kattis | imagedecoding | imagedecoding | 6.2d | Output Formatting, H | simple Run-Length Encoding | 321 | 3.4 | no | no | https://open.kattis.com/problems/imagedecoding 1032 | Kattis | juryjeopardy | juryjeopardy | 6.2d | Output Formatting, H | tedious problem | 309 | 2.3 | no | no | https://open.kattis.com/problems/juryjeopardy 1033 | Kattis | nizovi | nizovi | 6.2d | Output Formatting, H | formatting with indentation; not that trivial but sample input/output helps | 199 | 3.8 | no | no | https://open.kattis.com/problems/nizovi 1034 | UVa | 11048 | | 6.2e | String Comparison | flexible string comparison with respect to a dictionary | - | 0.0 | no | no | https://onlinejudge.org/external/110/11048.pdf 1035 | UVa | 11056 | | 6.2e | String Comparison | sorting; case-insensitive string comparison | - | 0.0 | no | no | https://onlinejudge.org/external/110/11056.pdf 1036 | UVa | 11734 | | 6.2e | String Comparison | custom comparison | - | 0.0 | no | no | https://onlinejudge.org/external/117/11734.pdf 1037 | LeetCode | lc0014 | Longest Common Prefix | 6.2e | String Comparison | complete search; try each prefix; see if it all strings start with it; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/longest-common-prefix/ 1038 | Kattis | phonelist | phonelist | 6.2e | String Comparison | sort the numbers; see if num i is a prefix of num i+1 | 1955 | 4.3 | no | no | https://open.kattis.com/problems/phonelist 1039 | Kattis | rhyming | rhyming | 6.2e | String Comparison | compare suffix of a common word with the list of other given words | 296 | 2.5 | no | no | https://open.kattis.com/problems/rhyming 1040 | Kattis | 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 | no | no | https://open.kattis.com/problems/smartphone 1041 | UVa | 11483 | | 6.2f | Really Ad Hoc | straightforward; use 'escape character' | - | 0.0 | no | no | https://onlinejudge.org/external/114/11483.pdf 1042 | UVa | 12916 | | 6.2f | Really Ad Hoc | factorize n; string period; also see UVa 11452 | - | 0.0 | no | no | https://onlinejudge.org/external/129/12916.pdf 1043 | Kattis | irepeatmyself | irepeatmyself | 6.2f | Really Ad Hoc | string period; complete search | 380 | 2.4 | no | no | https://open.kattis.com/problems/irepeatmyself 1044 | LeetCode | lc0459 | Repeated Substring Pattern | 6.2f | Really Ad Hoc | complete search; test repeated substring; programming-skills | 0 | 2.0 | yes | no | https://leetcode.com/problems/repeated-substring-pattern/ 1045 | LeetCode | lc0890 | Find and Replace Pattern | 6.2f | Really Ad Hoc | custom matching; map each word to appropriate index (signature); compare signatures | 0 | 4.0 | yes | no | https://leetcode.com/problems/find-and-replace-pattern/ 1046 | Kattis | periodicstrings | periodicstrings | 6.2f | Really Ad Hoc | brute force; skip non divisor | 299 | 3.0 | no | no | https://open.kattis.com/problems/periodicstrings 1047 | Kattis | raggedright | raggedright | 6.2f | Really Ad Hoc | just simulate the requirement | 1708 | 1.8 | no | no | https://open.kattis.com/problems/raggedright 1048 | Kattis | 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 | no | no | https://open.kattis.com/problems/zipfslaw 1049 | UVa | 01192 | | 6.3a | DP String, Classic | LA2460 - Singapore01; classic String Alignment DP problem with a bit of (unclear) output formatting | - | 0.0 | no | no | https://onlinejudge.org/external/11/1192.pdf 1050 | UVa | 12747 | | 6.3a | DP String, Classic | similar to UVa 10635 | - | 0.0 | no | no | https://onlinejudge.org/external/127/12747.pdf 1051 | UVa | 13146 | | 6.3a | DP String, Classic | classic Edit Distance problem | - | 0.0 | no | no | https://onlinejudge.org/external/131/13146.pdf 1052 | Kattis | 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 | no | no | https://open.kattis.com/problems/inflagrantedelicto 1053 | LeetCode | lc1143 | Longest Common Subsequence | 6.3a | DP String, Classic | classic; leetcode-75; top-100-liked | 0 | 4.0 | yes | yes | https://leetcode.com/problems/longest-common-subsequence/ 1054 | Kattis | pandachess | pandachess | 6.3a | DP String, Classic | LCS of 2 permutations → LIS; O(n log k) solution; also see UVa 10635 | 267 | 6.0 | no | no | https://open.kattis.com/problems/pandachess 1055 | Kattis | princeandprincess | princeandprincess | 6.3a | DP String, Classic | find LCS of two permutations; also available at UVa 10635 - Prince and Princess | 140 | 6.7 | no | no | https://open.kattis.com/problems/princeandprincess 1056 | UVa | 11258 | | 6.3b | DP String, Non Classic | dp(i) = int from substring [i..k] dp(k) | - | 0.0 | no | no | https://onlinejudge.org/external/112/11258.pdf 1057 | UVa | 11552 | | 6.3b | DP String, Non Classic | dp(i; c) = minimum number of chunks after considering the first i segments ending with character c | - | 0.0 | no | no | https://onlinejudge.org/external/115/11552.pdf 1058 | Kattis | 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 | no | no | https://open.kattis.com/problems/exam 1059 | Kattis | 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 | no | no | https://open.kattis.com/problems/heritage 1060 | Kattis | 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 | no | no | https://open.kattis.com/problems/hillnumbers 1061 | LeetCode | lc0097 | Interleaving String | 6.3b | DP String, Non Classic | s: (i, j); k is derived from i+j; t: use a[i] or b[i] next; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/interleaving-string/ 1062 | Kattis | 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 | no | no | https://open.kattis.com/problems/stringfactoring 1063 | UVa | 01449 | | 6.4a | String Matching | LA 4670 - Hefei09; just use strstr; Suffix Array will get TLE as there are too many long strings to be processed | - | 0.0 | no | no | https://onlinejudge.org/external/14/1449.pdf 1064 | UVa | 11837 | | 6.4a | String Matching | transform the input of X notes into X-1 distances; then apply KMP | - | 0.0 | no | no | https://onlinejudge.org/external/118/11837.pdf 1065 | Kattis | geneticsearch | geneticsearch | 6.4a | String Matching | multiple string matchings | 346 | 2.1 | no | no | https://open.kattis.com/problems/geneticsearch 1066 | LeetCode | lc0028 | Find the Index of the First Occurrence in a String | 6.4a | String Matching | simple string matching; programming-skills; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/ 1067 | Kattis | 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 | no | no | https://open.kattis.com/problems/powerstrings 1068 | Kattis | quiteaproblem | quiteaproblem | 6.4a | String Matching | trivial string matching per line | 1212 | 2.1 | no | no | https://open.kattis.com/problems/quiteaproblem 1069 | Kattis | scrollingsign | scrollingsign | 6.4a | String Matching | modified string matching; complete search; also available at UVa 11576 - Scrolling Sign | 238 | 3.1 | no | no | https://open.kattis.com/problems/scrollingsign 1070 | UVa | 00736 | | 6.4b | String Matching, 2D | 2D grid; a bit modified | - | 0.0 | no | no | https://onlinejudge.org/external/7/736.pdf 1071 | UVa | 10010 | | 6.4b | String Matching, 2D | 2D grid; backtracking | - | 0.0 | no | no | https://onlinejudge.org/external/100/10010.pdf 1072 | UVa | 11283 | | 6.4b | String Matching, 2D | 2D grid; backtracking; do not count twice | - | 0.0 | no | no | https://onlinejudge.org/external/112/11283.pdf 1073 | Kattis | boggle | boggle | 6.4b | String Matching, 2D | 2D grid; backtracking | 323 | 3.8 | no | no | https://open.kattis.com/problems/boggle 1074 | Kattis | 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 | no | no | https://open.kattis.com/problems/kinarow 1075 | Kattis | knightsearch | knightsearch | 6.4b | String Matching, 2D | 2D grid; backtracking or DP | 425 | 3.2 | no | no | https://open.kattis.com/problems/knightsearch 1076 | LeetCode | lc0079 | Word Search | 6.4b | String Matching, 2D | backtracking; top-100-liked; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/word-search/ 1077 | Kattis | bing | bing | 6.5a | Trie | map all prefixes to frequencies using Hash Table; or use Trie | 1061 | 3.6 | no | no | https://open.kattis.com/problems/bing 1078 | LeetCode | lc0208 | Implement Trie (Prefix Tree) | 6.5a | Trie | Trie implementation; leetcode-75; top-100-liked; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/implement-trie-prefix-tree/ 1079 | LeetCode | lc0648 | Replace Words | 6.5a | Trie | use Trie to speed-up the identification of the shortest root for each derivative | 0 | 4.0 | yes | no | https://leetcode.com/problems/replace-words/ 1080 | LeetCode | lc1268 | Search Suggestions System | 6.5a | Trie | use Trie to speed-up; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/search-suggestions-system/ 1081 | LeetCode | lc2416 | Sum of Prefix Scores of Strings | 6.5a | Trie | we can use Trie or frequency Counter of each prefixes | 0 | 6.0 | yes | no | https://leetcode.com/problems/sum-of-prefix-scores-of-strings/ 1082 | UVa | 01254 | | 6.5b | Suffix Tree/Array | LA 4657 - Jakarta09; Suffix Array with Segment Tree or Sparse Table; LCP range | - | 0.0 | no | no | https://onlinejudge.org/external/12/1254.pdf 1083 | UVa | 01584 | | 6.5b | Suffix Tree/Array | LA 3225 - Seoul04; min lexicographic rotation; similar with UVa 00719; other solutions exist | - | 0.0 | no | no | https://onlinejudge.org/external/15/1584.pdf 1084 | Kattis | automatictrading | automatictrading | 6.5b | Suffix Tree/Array | Suffix Array; LCP of a range; use Sparse Table | 160 | 5.2 | no | no | https://open.kattis.com/problems/automatictrading 1085 | Kattis | buzzwords | buzzwords | 6.5b | Suffix Tree/Array | Longest Repeated Substring that appears X times (2 ≤ X < N); also available at UVa 11855 - Buzzwords | 141 | 5.0 | no | no | https://open.kattis.com/problems/buzzwords 1086 | LeetCode | lc1044 | Longest Duplicate Substring | 6.5b | Suffix Tree/Array | classic Longest Repeated Substring problem; solvable with Suffix Array | 0 | 6.0 | yes | no | https://leetcode.com/problems/longest-duplicate-substring/ 1087 | Kattis | suffixarrayreconstruction | suffixarrayreconstruction | 6.5b | Suffix Tree/Array | clever creative problem involving Suffix Array concept; be careful that '*' can be more than one character | 125 | 4.1 | no | no | https://open.kattis.com/problems/suffixarrayreconstruction 1088 | Kattis | suffixsorting | suffixsorting | 6.5b | Suffix Tree/Array | basic Suffix Array construction problem; be careful with terminating symbol | 201 | 5.7 | no | no | https://open.kattis.com/problems/suffixsorting 1089 | UVa | 12467 | | 6.6a | String Hashing | hashing/'border' of KMP; see UVa 11475 | - | 0.0 | no | no | https://onlinejudge.org/external/124/12467.pdf 1090 | UVa | 12604 | | 6.6a | String Hashing | try Rabin-Karp/KMP up to 62 times | - | 0.0 | no | no | https://onlinejudge.org/external/126/12604.pdf 1091 | Kattis | 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 | no | no | https://open.kattis.com/problems/hashing 1092 | LeetCode | lc0187 | Repeated DNA Sequences | 6.6a | String Hashing | classic rolling hash task; maintain hash of 10-characters substring as the window slides | 0 | 4.0 | yes | no | https://leetcode.com/problems/repeated-dna-sequences/ 1093 | Kattis | stringmatching | stringmatching | 6.6a | String Hashing | try Rabin-Karp or KMP | 719 | 4.5 | no | no | https://open.kattis.com/problems/stringmatching 1094 | UVa | 00156 | | 6.7a | Anagram | easier with algorithm::sort | - | 0.0 | no | no | https://onlinejudge.org/external/1/156.pdf 1095 | UVa | 00195 | | 6.7a | Anagram | use algorithm::next_permutation | - | 0.0 | no | no | https://onlinejudge.org/external/1/195.pdf 1096 | UVa | 12641 | | 6.7a | Anagram | anagram problem variation | - | 0.0 | no | no | https://onlinejudge.org/external/126/12641.pdf 1097 | UVa | 12770 | | 6.7a | Anagram | count frequencies; print odd frequency characters with except the last one -- put it in the middle of a palindrome | - | 0.0 | no | no | https://onlinejudge.org/external/127/12770.pdf 1098 | LeetCode | lc0242 | Valid Anagram | 6.7a | Anagram | sort s and t; compare; programming-skills; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/valid-anagram/ 1099 | Kattis | multigram | multigram | 6.7a | Anagram | brute force lengths that is divisor of the original length of the string; test | 221 | 2.8 | no | no | https://open.kattis.com/problems/multigram 1100 | UVa | 00401 | | 6.7b | Palindrome (Checking) | simple palindrome check | - | 0.0 | no | no | https://onlinejudge.org/external/4/401.pdf 1101 | UVa | 10848 | | 6.7b | Palindrome (Checking) | related to UVa 10453; palindrome check, character frequency check, and a few others | - | 0.0 | no | no | https://onlinejudge.org/external/108/10848.pdf 1102 | UVa | 11888 | | 6.7b | Palindrome (Checking) | let ss = s+s; find reverse(s) in ss, but it cannot match the first n chars or the last n chars of ss | - | 0.0 | no | no | https://onlinejudge.org/external/118/11888.pdf 1103 | Kattis | kaleidoscopicpalindromes | kaleidoscopicpalindromes | 6.7b | Palindrome (Checking) | test all; when you try enlarging k, the answers are actually 'small' | 233 | 3.2 | no | no | https://open.kattis.com/problems/kaleidoscopicpalindromes 1104 | LeetCode | lc0647 | Palindromic Substrings | 6.7b | Palindrome (Checking) | complete search all substrings plus DP isPalindrome(l, r) speedup | 0 | 4.0 | yes | yes | https://leetcode.com/problems/palindromic-substrings/ 1105 | Kattis | 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 | no | no | https://open.kattis.com/problems/palindromesubstring 1106 | Kattis | 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 | no | no | https://open.kattis.com/problems/peragrams 1107 | UVa | 01239 | | 6.7c | Palindrome (Generating) | LA 4144 - Jakarta08; as S <= 1000; brute-force is enough; consider odd and even length palindromes | - | 0.0 | no | no | https://onlinejudge.org/external/12/1239.pdf 1108 | UVa | 10018 | | 6.7c | Palindrome (Generating) | generating palindrome with specific math simulation; very easy | - | 0.0 | no | no | https://onlinejudge.org/external/100/10018.pdf 1109 | UVa | 12718 | | 6.7c | Palindrome (Generating) | LA 6659 - Dhaka13; try all substrings; count character frequencies in them and analyze | - | 0.0 | no | no | https://onlinejudge.org/external/127/12718.pdf 1110 | Kattis | 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 | no | no | https://open.kattis.com/problems/evilstraw 1111 | LeetCode | lc0409 | Longest Palindrome | 6.7c | Palindrome (Generating) | count character frequencies; even cases are easy; odd cases need a small observation | 0 | 2.0 | yes | yes | https://leetcode.com/problems/longest-palindrome/ 1112 | Kattis | names | names | 6.7c | Palindrome (Generating) | add a letter or change a letter; complete search | 368 | 4.0 | no | no | https://open.kattis.com/problems/names 1113 | UVa | 01595 | | 7.2a | Points | use set to record the positions of all sorted points; check half of the points if the symmetries are in the set too? | - | 0.0 | no | no | https://onlinejudge.org/external/15/1595.pdf 1114 | UVa | 11894 | | 7.2a | Points | about rotating and translating points | - | 0.0 | no | no | https://onlinejudge.org/external/118/11894.pdf 1115 | Kattis | browniepoints | browniepoints | 7.2a | Points | points and quadrants; simple; also available at UVa 10865 - Brownie Points | 154 | 2.3 | no | no | https://open.kattis.com/problems/browniepoints 1116 | Kattis | cursethedarkness | cursethedarkness | 7.2a | Points | Euclidean dist | 596 | 2.2 | no | yes | https://open.kattis.com/problems/cursethedarkness 1117 | Kattis | imperfectgps | imperfectgps | 7.2a | Points | Euclidean dist; simulation | 487 | 4.2 | no | no | https://open.kattis.com/problems/imperfectgps 1118 | Kattis | jointjogjam | jointjogjam | 7.2a | Points | take the max Euclidean dist between two starting vs two ending points | 448 | 1.6 | yes | no | https://open.kattis.com/problems/jointjogjam 1119 | LeetCode | lc1232 | Check If It Is a Straight Line | 7.2a | Points | check if all other points are collinear with the line defined by the first two points; programming-skills | 0 | 2.0 | yes | no | https://leetcode.com/problems/check-if-it-is-a-straight-line/ 1120 | UVa | 10263 | | 7.2b | Lines | use distToLineSegment | - | 0.0 | no | no | https://onlinejudge.org/external/102/10263.pdf 1121 | UVa | 11783 | | 7.2b | Lines | O(N^2) brute force line segment intersection tests | - | 0.0 | no | no | https://onlinejudge.org/external/117/11783.pdf 1122 | UVa | 13117 | | 7.2b | Lines | dist + distToLineSegment | - | 0.0 | no | no | https://onlinejudge.org/external/131/13117.pdf 1123 | Kattis | hurricanedanger | hurricanedanger | 7.2b | Lines | distance from point to line (not vector); be careful of precision error; work with integers | 114 | 5.9 | no | no | https://open.kattis.com/problems/hurricanedanger 1124 | Kattis | 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 | no | no | https://open.kattis.com/problems/logo2 1125 | Kattis | platforme | platforme | 7.2b | Lines | line segment intersection tests; N ≤ 100; complete search | 210 | 2.7 | no | no | https://open.kattis.com/problems/platforme 1126 | Kattis | unlockpattern | unlockpattern | 7.2b | Lines | complete search; Euclidean dist | 902 | 1.7 | no | no | https://open.kattis.com/problems/unlockpattern 1127 | UVa | 01388 | | 7.2c | Circles | LA 3708 - NortheasternEurope06; divide the circle into n sectors first and then into (n m) sectors | - | 0.0 | no | no | https://onlinejudge.org/external/13/1388.pdf 1128 | UVa | 10678 | | 7.2c | Circles | area of an ellipse; generalization of the formula for area of a circle | - | 0.0 | no | no | https://onlinejudge.org/external/106/10678.pdf 1129 | Kattis | amsterdamdistance | amsterdamdistance | 7.2c | Circles | arcs of circles; no need to model this as an SSSP problem/Dijkstra's | 571 | 2.9 | no | no | https://open.kattis.com/problems/amsterdamdistance 1130 | Kattis | biggest | biggest | 7.2c | Circles | find biggest area of sector using simulation; use array (not that larget) to avoid precision error | 147 | 6.6 | no | no | https://open.kattis.com/problems/biggest 1131 | Kattis | estimatingtheareaofacircle | estimatingtheareaofacircle | 7.2c | Circles | PI estimation experiment | 2084 | 1.6 | no | no | https://open.kattis.com/problems/estimatingtheareaofacircle 1132 | LeetCode | lc1828 | Queries on Number of Points Inside a Circle | 7.2c | Circles | for each circle query, check how many points are inside; O(QN) | 0 | 4.0 | yes | no | https://leetcode.com/problems/queries-on-number-of-points-inside-a-circle/ 1133 | Kattis | ornaments | ornaments | 7.2c | Circles | arch length plus two times tangent lengths | 236 | 2.2 | no | no | https://open.kattis.com/problems/ornaments 1134 | UVa | 00427 | | 7.2d | Triangles (Trig) | for each 2 consecutive corridors, try rotating the piano by a angle α ∈ [0.1..89.9] degrees; trigonometry | - | 0.0 | no | no | https://onlinejudge.org/external/4/427.pdf 1135 | UVa | 11326 | | 7.2d | Triangles (Trig) | trigonometry; tangent; reflection trick | - | 0.0 | no | no | https://onlinejudge.org/external/113/11326.pdf 1136 | Kattis | alldifferentdirections | alldifferentdirections | 7.2d | Triangles (Trig) | use trigonometry to compute x and y displacement | 446 | 2.6 | no | no | https://open.kattis.com/problems/alldifferentdirections 1137 | Kattis | billiard | billiard | 7.2d | Triangles (Trig) | enlarge the billiard table; then this is solvable with atan2 | 856 | 1.6 | no | no | https://open.kattis.com/problems/billiard 1138 | Kattis | egypt | egypt | 7.2d | Triangles (Trig) | Pythagorean theorem/triple; also available at UVa 11854 - Egypt | 862 | 1.9 | no | no | https://open.kattis.com/problems/egypt 1139 | LeetCode | lc1925 | Count Square Sum Triples | 7.2d | Triangles (Trig) | Pythagorean triples; complete search | 0 | 2.0 | yes | yes | https://leetcode.com/problems/count-square-sum-triples/ 1140 | Kattis | mountainbiking | mountainbiking | 7.2d | Triangles (Trig) | up to 4 line segments; simple trigonometry; simple Physics/Kinematic equation | 216 | 2.8 | no | no | https://open.kattis.com/problems/mountainbiking 1141 | UVa | 00438 | | 7.2e | Triangles + Circles | compute triangle's circumcircle | - | 0.0 | no | no | https://onlinejudge.org/external/4/438.pdf 1142 | UVa | 10577 | | 7.2e | Triangles + Circles | get center radius of outer circle from 3 points; get all vertices; get the min-x/max-x/min-y/max-y of the polygon; also ... | - | 0.0 | no | no | https://onlinejudge.org/external/105/10577.pdf 1143 | UVa | 11281 | | 7.2e | Triangles + Circles | circumcircle for a non obtuse triangle; largest side of the triangle for an obtuse triangle | - | 0.0 | no | no | https://onlinejudge.org/external/112/11281.pdf 1144 | UVa | 13215 | | 7.2e | Triangles + Circles | area of rectangle minus area of squares and equilateral triangles | - | 0.0 | no | no | https://onlinejudge.org/external/132/13215.pdf 1145 | Kattis | cropeasy | cropeasy | 7.2e | Triangles + Circles | complete search 3 points/tree; check if the center is integer | 178 | 3.0 | no | no | https://open.kattis.com/problems/cropeasy 1146 | Kattis | stickysituation | stickysituation | 7.2e | Triangles + Circles | see if 3 sides form a triangle; see UVa 11579 | 675 | 2.7 | no | no | https://open.kattis.com/problems/stickysituation 1147 | Kattis | trilemma | trilemma | 7.2e | Triangles + Circles | triangle properties; sort the 3 sides first | 225 | 3.6 | no | no | https://open.kattis.com/problems/trilemma 1148 | UVa | 00209 | | 7.2f | Quadrilaterals | LA 5148 - WorldFinals SanAntonio91; brute force check; answer is either triangle, parallelogram, or hexagon | - | 0.0 | no | no | https://onlinejudge.org/external/2/209.pdf 1149 | UVa | 11800 | | 7.2f | Quadrilaterals | use next_permutation to try all possible 4! = 24 permutations of 4 points; check the requirements | - | 0.0 | no | no | https://onlinejudge.org/external/118/11800.pdf 1150 | Kattis | cetvrta | cetvrta | 7.2f | Quadrilaterals | sort the x and y points, then you will know the 4th point | 4727 | 1.3 | no | no | https://open.kattis.com/problems/cetvrta 1151 | LeetCode | lc0836 | Rectangle Overlap | 7.2f | Quadrilaterals | set rec2 as reference point; simple case analysis of where rec1 is vs rec2 | 0 | 2.0 | yes | no | https://leetcode.com/problems/rectangle-overlap/ 1152 | Kattis | officespace | officespace | 7.2f | Quadrilaterals | rectangles; small numbers; 2D Boolean arrays | 143 | 5.5 | no | no | https://open.kattis.com/problems/officespace 1153 | Kattis | rectanglesurrounding | rectanglesurrounding | 7.2f | Quadrilaterals | rectangles; small; 2D Boolean arrays | 187 | 3.8 | no | no | https://open.kattis.com/problems/rectanglesurrounding 1154 | Kattis | roundedbuttons | roundedbuttons | 7.2f | Quadrilaterals | in-rectangle/in-square test; in-4-circles tests | 176 | 2.9 | no | no | https://open.kattis.com/problems/roundedbuttons 1155 | UVa | 00634 | | 7.3a | Polygon, Easier | basic inPolygon routine; notice that the input polygon can be convex or concave | - | 0.0 | no | no | https://onlinejudge.org/external/6/634.pdf 1156 | UVa | 11447 | | 7.3a | Polygon, Easier | area of polygon | - | 0.0 | no | no | https://onlinejudge.org/external/114/11447.pdf 1157 | Kattis | convexhull | convexhull | 7.3a | Polygon, Easier | basic convex hull problem; be careful with duplicate points and collinear points | 644 | 4.8 | no | no | https://open.kattis.com/problems/convexhull 1158 | Kattis | cuttingcorners | cuttingcorners | 7.3a | Polygon, Easier | simulation of angle checks | 95 | 3.5 | no | no | https://open.kattis.com/problems/cuttingcorners 1159 | LeetCode | lc0587 | Erect the Fence | 7.3a | Polygon, Easier | Convex Hull; collinear allowed | 0 | 6.0 | yes | no | https://leetcode.com/problems/erect-the-fence/ 1160 | Kattis | robotprotection | robotprotection | 7.3a | Polygon, Easier | simply find the area of convex hull | 236 | 2.4 | no | no | https://open.kattis.com/problems/robotprotection 1161 | UVa | 00361 | | 7.3b | Polygon, Harder | check if a point is inside CH of Cop/Robber; if $pt$ is inside CH, pt satisfies the requirement | - | 0.0 | no | no | https://onlinejudge.org/external/3/361.pdf 1162 | UVa | 01111 | | 7.3b | Polygon, Harder | LA 5138 - WorldFinals Orlando11; CH; output minimax distance of each CH side to the other vertices | - | 0.0 | no | no | https://onlinejudge.org/external/11/1111.pdf 1163 | UVa | 10256 | | 7.3b | Polygon, Harder | given 2 CHs, output 'No' if there is a point in 1st CH inside the 2nd one; 'Yes' otherwise | - | 0.0 | no | no | https://onlinejudge.org/external/102/10256.pdf 1164 | UVa | 11265 | | 7.3b | Polygon, Harder | seems to be a complex problem; but essentially just cutPolygon; inPolygon; area | - | 0.0 | no | no | https://onlinejudge.org/external/112/11265.pdf 1165 | Kattis | convex | convex | 7.3b | Polygon, Harder | must understand the concept of convex polygon; a bit of mathematical insights: GCD; sort | 132 | 6.4 | no | no | https://open.kattis.com/problems/convex 1166 | Kattis | pointinpolygon | pointinpolygon | 7.3b | Polygon, Harder | in/out and on polygon | 311 | 5.5 | no | no | https://open.kattis.com/problems/pointinpolygon 1167 | Kattis | roberthood | roberthood | 7.3b | Polygon, Harder | the classic furthest pair problem; use convex hull and then rotating caliper | 376 | 4.6 | no | no | https://open.kattis.com/problems/roberthood 1168 | UVa | 00535 | | 7.4a | 3D Geometry | gcDistance | - | 0.0 | no | no | https://onlinejudge.org/external/5/535.pdf 1169 | UVa | 00737 | | 7.4a | 3D Geometry | cube and cube intersection | - | 0.0 | no | no | https://onlinejudge.org/external/7/737.pdf 1170 | UVa | 00815 | | 7.4a | 3D Geometry | LA 5215 - WorldFinals Eindhoven99; volume; greedy | - | 0.0 | no | no | https://onlinejudge.org/external/8/815.pdf 1171 | UVa | 11817 | | 7.4a | 3D Geometry | gcDistance; 3D Euclidean distance; also available at Kattis - tunnelingtheearth | - | 0.0 | no | no | https://onlinejudge.org/external/118/11817.pdf 1172 | Kattis | airlinehub | airlinehub | 7.4a | 3D Geometry | gcDistance; also available at UVa 10316 - Airline Hub | 211 | 6.6 | no | no | https://open.kattis.com/problems/airlinehub 1173 | Kattis | beavergnaw | beavergnaw | 7.4a | 3D Geometry | volumes of cylinders and cones; inclusion-exclusion; also available at UVa 10297 - Beavergnaw | 1210 | 1.4 | no | no | https://open.kattis.com/problems/beavergnaw 1174 | Kattis | bottles | bottles | 7.4a | 3D Geometry | LA 6027 - WorldFinals Warsaw12; BSTA+geometric formula; also available at UVa 01280 - Curvy Little Bottles | 217 | 3.0 | no | no | https://open.kattis.com/problems/bottles 1175 | Kattis | flowers | flowers | 7.4a | 3D Geometry | the key part of this problem is integration | 63 | 4.4 | no | no | https://open.kattis.com/problems/flowers 1176 | Kattis | movingday | movingday | 7.4a | 3D Geometry | output volume of the largest cuboid - V | 261 | 2.1 | no | no | https://open.kattis.com/problems/movingday 1177 | UVa | 00711 | | 8.2a | Harder Backtracking | backtracking with pruning | - | 0.0 | no | no | https://onlinejudge.org/external/7/711.pdf 1178 | UVa | 01052 | | 8.2a | Harder Backtracking | LA 3565 - WorldFinals SanAntonio06; backtracking with some form of bitmask | - | 0.0 | no | no | https://onlinejudge.org/external/10/1052.pdf 1179 | UVa | 11090 | | 8.2a | Harder Backtracking | this is the simplest form of Min Mean Cycle problem; however it has small constraints and thus this problem is still sol... | - | 0.0 | no | no | https://onlinejudge.org/external/110/11090.pdf 1180 | UVa | 11451 | | 8.2a | Harder Backtracking | the input constraints are small; backtracking with bitmask without memoization; or use DP | - | 0.0 | no | no | https://onlinejudge.org/external/114/11451.pdf 1181 | UVa | 11699 | | 8.2a | Harder Backtracking | try all the possible row combinations on which we put rooks and keep the best | - | 0.0 | no | no | https://onlinejudge.org/external/116/11699.pdf 1182 | Kattis | 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 | no | no | https://open.kattis.com/problems/committeeassignment 1183 | Kattis | greatswercporto | greatswercporto | 8.2a | Harder Backtracking | use backtracking with pruning; testing up to 10! possible permutations possibly TLE | 120 | 4.1 | no | no | https://open.kattis.com/problems/greatswercporto 1184 | Kattis | holeynqueensbatman | holeynqueensbatman | 8.2a | Harder Backtracking | similar with UVa 11195 | 527 | 2.2 | no | no | https://open.kattis.com/problems/holeynqueensbatman 1185 | UVa | 01600 | | 8.2b | State-Space, BFS, E | LA 3670 - Hanoi06; s: (row; col; k_left); reset k_left to the original k as soon as the robot enters a non obstacle cell | - | 0.0 | no | no | https://onlinejudge.org/external/16/1600.pdf 1186 | UVa | 10047 | | 8.2b | State-Space, BFS, E | s: (row, col, dir, color) | - | 0.0 | no | no | https://onlinejudge.org/external/100/10047.pdf 1187 | UVa | 12135 | | 8.2b | State-Space, BFS, E | LA 4201 - Dhaka08; s: (bitmask); BFS; similar with UVa 11974 | - | 0.0 | no | no | https://onlinejudge.org/external/121/12135.pdf 1188 | Kattis | ecoins | ecoins | 8.2b | State-Space, BFS, E | s: (conventional-value, infotechnological-value); BFS; also available at UVa 10306 - e-Coins | 169 | 4.6 | no | no | https://open.kattis.com/problems/ecoins 1189 | Kattis | flipfive | flipfive | 8.2b | State-Space, BFS, E | s: (bitmask); only 2^9 = 512 grid configurations; BFS | 621 | 2.7 | no | no | https://open.kattis.com/problems/flipfive 1190 | LeetCode | lc0433 | Minimum Genetic Mutation | 8.2b | State-Space, BFS, E | unweighted SSSP; BFS; s: (8-char-gene); t: as described; top-interview-150 | 0 | 4.0 | yes | no | https://leetcode.com/problems/minimum-genetic-mutation/ 1191 | Kattis | safe | safe | 8.2b | State-Space, BFS, E | s: (convert 3x3 grid into a base 4 integer); BFS | 181 | 3.0 | no | no | https://open.kattis.com/problems/safe 1192 | UVa | 11198 | | 8.2c | State-Space, BFS, H | s: (permutation); tricky to code | - | 0.0 | no | no | https://onlinejudge.org/external/111/11198.pdf 1193 | UVa | 11212 | | 8.2c | State-Space, BFS, H | meet in the middle | - | 0.0 | no | no | https://onlinejudge.org/external/112/11212.pdf 1194 | UVa | 11329 | | 8.2c | State-Space, BFS, H | s: (bitmask); 4 bits for die position; 16 bits for cells with fleas; 6 bits for side with a flea; use map; tedious | - | 0.0 | no | no | https://onlinejudge.org/external/113/11329.pdf 1195 | Kattis | 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 | no | no | https://open.kattis.com/problems/keyboard 1196 | LeetCode | lc0126 | Word Ladder II | 8.2c | State-Space, BFS, H | map string to indices; BFS on state-space graph; backtrack | 0 | 6.0 | yes | no | https://leetcode.com/problems/word-ladder-ii/ 1197 | Kattis | robotmaze | robotmaze | 8.2c | State-Space, BFS, H | s: (r, c, dir, steps); be careful of corner cases | 87 | 5.7 | no | no | https://open.kattis.com/problems/robotmaze 1198 | Kattis | robotturtles | robotturtles | 8.2c | State-Space, BFS, H | s: (r, c, dir, bitmask_ice_castles); print solution; very tedious | 114 | 4.5 | no | no | https://open.kattis.com/problems/robotturtles 1199 | UVa | 00658 | | 8.2d | State-Space, Dijkstra | s: (bitmask---whether a bug is present or not); the state-space graph is weighted | - | 0.0 | no | no | https://onlinejudge.org/external/6/658.pdf 1200 | UVa | 01048 | | 8.2d | State-Space, Dijkstra | LA 3561 - WorldFinals SanAntonio06; tedious state-space search problem; use Dijkstra's | - | 0.0 | no | no | https://onlinejudge.org/external/10/1048.pdf 1201 | UVa | 01057 | | 8.2d | State-Space, Dijkstra | LA 3570 - WorldFinals SanAntonio06; Floyd-Warshall; APSP; reduce to weighted SSSP problem; Dijkstra's | - | 0.0 | no | no | https://onlinejudge.org/external/10/1057.pdf 1202 | UVa | 10269 | | 8.2d | State-Space, Dijkstra | use Floyd-Warshall to pre-compute APSP using only Villages; use Dijkstra's on s: (u, super_run_left) | - | 0.0 | no | no | https://onlinejudge.org/external/102/10269.pdf 1203 | Kattis | bumped | bumped | 8.2d | State-Space, Dijkstra | s: (city, has_use_free_ticket); use Dijkstra's | 545 | 4.4 | no | no | https://open.kattis.com/problems/bumped 1204 | Kattis | 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 | no | no | https://open.kattis.com/problems/destinationunknown 1205 | Kattis | justpassingthrough | justpassingthrough | 8.2d | State-Space, Dijkstra | s: (r, c, n_left); Dijkstra's/SSSP on DAG | 92 | 5.1 | no | no | https://open.kattis.com/problems/justpassingthrough 1206 | UVa | 01172 | | 8.3a | DP level 3 | LA 3986 - SouthWesternEurope07; weighted bipartite matching with additional constraints | - | 0.0 | no | no | https://onlinejudge.org/external/11/1172.pdf 1207 | UVa | 01211 | | 8.3a | DP level 3 | LA 3404 - Tokyo05; precompute T[L], the time to run a path of length L; s: (i) - checkpoint i is we change tire | - | 0.0 | no | no | https://onlinejudge.org/external/12/1211.pdf 1208 | UVa | 10645 | | 8.3a | DP level 3 | s: (days_left, budget_left, prev_dish, prev_dish_cnt); the first 2 params are knapsack-style; the last 2 params to deter... | - | 0.0 | no | no | https://onlinejudge.org/external/106/10645.pdf 1209 | Kattis | 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 | no | no | https://open.kattis.com/problems/aspenavenue 1210 | Kattis | 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 | no | no | https://open.kattis.com/problems/busticket 1211 | LeetCode | lc0188 | Best Time to Buy and Sell Stock IV | 8.3a | DP level 3 | s: (i, own, k_left); t: skip or buy/sell; also consider k_left; top-interview-150 | 0 | 6.0 | yes | no | https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/ 1212 | UVa | 01238 | | 8.3b | DP level 4 | LA 4143 - Jakarta08; offset technique | - | 0.0 | no | no | https://onlinejudge.org/external/12/1238.pdf 1213 | UVa | 12870 | | 8.3b | DP level 4 | LA 6848 - Bangkok14; split DP for fishing and nourishing; try all combination of K fishing + 2K nourishing events | - | 0.0 | no | no | https://onlinejudge.org/external/128/12870.pdf 1214 | Kattis | 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 | no | no | https://open.kattis.com/problems/coke 1215 | Kattis | companypicnic | companypicnic | 8.3b | DP level 4 | s: (name, has_been_matched); DP weighted matching (both cardinality and weight) on Tree | 200 | 5.0 | no | no | https://open.kattis.com/problems/companypicnic 1216 | LeetCode | lc0790 | Domino and Tromino Tiling | 8.3b | DP level 4 | s: (n, got_hole); t: depends whether there is a hole (due to a Triomino) or not; simple profile DP; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/domino-and-tromino-tiling/ 1217 | Kattis | rollercoasterfun | rollercoasterfun | 8.3b | DP level 4 | s: (T); split DPs when b = 0 and when b != 0 | 101 | 7.7 | no | no | https://open.kattis.com/problems/rollercoasterfun 1218 | UVa | 11125 | | 8.3c | Counting Paths, Harder | counting paths in implicit DAG; the implicit DAG is not trivial; 8 parameters | - | 0.0 | no | no | https://onlinejudge.org/external/111/11125.pdf 1219 | UVa | 11375 | | 8.3c | Counting Paths, Harder | counting paths in DAG; 2 parameters; be careful that we can create a 0 with 6 sticks; need to use Java BigInteger | - | 0.0 | no | no | https://onlinejudge.org/external/113/11375.pdf 1220 | UVa | 11432 | | 8.3c | Counting Paths, Harder | counting paths in DAG; the implicit DAG is not trivial; 6 parameters | - | 0.0 | no | no | https://onlinejudge.org/external/114/11432.pdf 1221 | Kattis | 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 | no | no | https://open.kattis.com/problems/countcircuits 1222 | Kattis | favourable | favourable | 8.3c | Counting Paths, Harder | s: (cur_page); t: jump to one of the 3 sections | 304 | 4.5 | no | no | https://open.kattis.com/problems/favourable 1223 | Kattis | pachinkoprobability | pachinkoprobability | 8.3c | Counting Paths, Harder | s: (pos); DAG modeling; long long | 113 | 5.8 | no | no | https://open.kattis.com/problems/pachinkoprobability 1224 | UVa | 01099 | | 8.3d | DP with Bitmask | LA 4794 - WorldFinals Harbin10; s: (w; bitmask); recover parameter value h | - | 0.0 | no | no | https://onlinejudge.org/external/10/1099.pdf 1225 | UVa | 01252 | | 8.3d | DP with Bitmask | LA 4643 - Tokyo09; DP, s: (mask1, mask2) where mask1/mask2 describes the features/answers, respectively | - | 0.0 | no | no | https://onlinejudge.org/external/12/1252.pdf 1226 | UVa | 10911 | | 8.3d | DP with Bitmask | the intro problem of this book; DP with bitmask; weighted MCM; small complete weighted graph | - | 0.0 | no | no | https://onlinejudge.org/external/109/10911.pdf 1227 | Kattis | 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 | no | no | https://open.kattis.com/problems/hidingchickens 1228 | LeetCode | lc3530 | Maximum Profit from Valid Topological Order in DAG | 8.3d | DP with Bitmask | s: (mult, mask); t: go to unprocessed vertex if the topological order is not violated | 0 | 6.0 | yes | no | https://leetcode.com/problems/maximum-profit-from-valid-topological-order-in-dag/ 1229 | Kattis | narrowartgallery | narrowartgallery | 8.3d | DP with Bitmask | interesting DP; s: (row, state_of_prev_row, k_left) | 1417 | 2.8 | no | no | https://open.kattis.com/problems/narrowartgallery 1230 | Kattis | pebblesolitaire2 | pebblesolitaire2 | 8.3d | DP with Bitmask | backtracking suffices for Kattis - pebblesolitair; but this version needs extra memoization | 400 | 3.6 | no | no | https://open.kattis.com/problems/pebblesolitaire2 1231 | UVa | 00820 | | 8.4a | Network Flow, Standard | LA 5220 - WorldFinals Orlando00; very basic max flow problem | - | 0.0 | no | no | https://onlinejudge.org/external/8/820.pdf 1232 | UVa | 11167 | | 8.4a | Network Flow, Standard | many edges in the flow graph; compress the capacity-1 edges when possible; use Dinic's | - | 0.0 | no | no | https://onlinejudge.org/external/111/11167.pdf 1233 | UVa | 11418 | | 8.4a | Network Flow, Standard | two layers of graph matching (not really bipartite matching); use max flow solution | - | 0.0 | no | no | https://onlinejudge.org/external/114/11418.pdf 1234 | UVa | 12873 | | 8.4a | Network Flow, Standard | LA 6851 - Bangkok14; assignment problem; similar to UVa 00259, 11045, and 10092; use Dinic's | - | 0.0 | no | no | https://onlinejudge.org/external/128/12873.pdf 1235 | Kattis | maxflow | maxflow | 8.4a | Network Flow, Standard | standard max flow problem for practice; print edges used in the max flow | 531 | 6.3 | no | no | https://open.kattis.com/problems/maxflow 1236 | Kattis | 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 | no | no | https://open.kattis.com/problems/mazemovement 1237 | Kattis | 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 | no | no | https://open.kattis.com/problems/mincut 1238 | UVa | 00563 | | 8.4b | Network Flow, Variants | check whether the maximum number of independent paths on the flow graph equals to b banks | - | 0.0 | no | no | https://onlinejudge.org/external/5/563.pdf 1239 | UVa | 11380 | | 8.4b | Network Flow, Variants | max flow modeling with vertex capacities; similar to UVa 12125 | - | 0.0 | no | no | https://onlinejudge.org/external/113/11380.pdf 1240 | UVa | 11757 | | 8.4b | Network Flow, Variants | creative problem about min cut; build the flow graph with a bit of simple geometry involving circle; then find the min c... | - | 0.0 | no | no | https://onlinejudge.org/external/117/11757.pdf 1241 | UVa | 11765 | | 8.4b | Network Flow, Variants | interesting min cut variant | - | 0.0 | no | no | https://onlinejudge.org/external/117/11765.pdf 1242 | Kattis | avoidingtheapocalypse | avoidingtheapocalypse | 8.4b | Network Flow, Variants | interesting max flow modeling; blow the vertices based on time | 191 | 4.4 | no | no | https://open.kattis.com/problems/avoidingtheapocalypse 1243 | Kattis | thekingofthenorth | thekingofthenorth | 8.4b | Network Flow, Variants | interesting min cut problem | 193 | 5.0 | no | no | https://open.kattis.com/problems/thekingofthenorth 1244 | Kattis | transportation | transportation | 8.4b | Network Flow, Variants | max flow with vertex capacities | 165 | 5.6 | no | no | https://open.kattis.com/problems/transportation 1245 | UVa | 00989 | | 8.6a | NP-hard/C, small, E | classic SUDOKU puzzle; the small 9x9 instance is solvable with backtracking with pruning; use bitmask to speed up | - | 0.0 | no | no | https://onlinejudge.org/external/9/989.pdf 1246 | UVa | 11088 | | 8.6a | NP-hard/C, small, E | similar to UVa 10911 but partitioning of three persons to one team; PARTITION-INTO-TRIANGLES | - | 0.0 | no | no | https://onlinejudge.org/external/110/11088.pdf 1247 | UVa | 12455 | | 8.6a | NP-hard/C, small, E | SUBSET-SUM; try all; see the harder UVa 12911 that requires meet in the middle | - | 0.0 | no | no | https://onlinejudge.org/external/124/12455.pdf 1248 | Kattis | 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 | no | no | https://open.kattis.com/problems/equalsumseasy 1249 | Kattis | 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 | no | no | https://open.kattis.com/problems/flowfree 1250 | Kattis | 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 | no | no | https://open.kattis.com/problems/font 1251 | Kattis | 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 | no | no | https://open.kattis.com/problems/socialadvertising 1252 | UVa | 01098 | | 8.6b | NP-hard/C, small, H | LA 4793 - WorldFinals Harbin10; HAMILTONIAN-TOUR; backtracking+pruning; meet in the middle | - | 0.0 | no | no | https://onlinejudge.org/external/10/1098.pdf 1253 | UVa | 11095 | | 8.6b | NP-hard/C, small, H | optimization version of Min Vertex Cover on general graph which is NP-Hard | - | 0.0 | no | no | https://onlinejudge.org/external/110/11095.pdf 1254 | UVa | 12911 | | 8.6b | NP-hard/C, small, H | SUBSET-SUM; we cannot use DP as 1 ≤ N ≤ 40 and -10^9 ≤ T ≤ 10^9; use meet in the middle | - | 0.0 | no | no | https://onlinejudge.org/external/129/12911.pdf 1255 | Kattis | 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 | no | no | https://open.kattis.com/problems/beanbag 1256 | Kattis | busplanning | busplanning | 8.6b | NP-hard/C, small, H | MIN-CLIQUE-COVER; DP bitmask over sets | 91 | 5.4 | no | no | https://open.kattis.com/problems/busplanning 1257 | LeetCode | lc0015 | 3Sum | 8.6b | NP-hard/C, small, H | one possible way is to hash all numbers and try all-pairs; avoid duplicates; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/3sum/ 1258 | Kattis | 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 | no | no | https://open.kattis.com/problems/programmingteamselection 1259 | UVa | 01347 | | 8.6c | NP-hard/C, special, E | LA 3305 - SoutheasternEurope05; this is the pure version of Bitonic TSP problem; you may want to start from here | - | 0.0 | no | no | https://onlinejudge.org/external/13/1347.pdf 1260 | UVa | 10859 | | 8.6c | NP-hard/C, special, E | Min-Vertex-Cover; on several trees; maximize number of edges with its two endpoints covered | - | 0.0 | no | no | https://onlinejudge.org/external/108/10859.pdf 1261 | UVa | 11159 | | 8.6c | NP-hard/C, special, E | MAX-INDEPENDENT-SET; on Bipartite Graph; ans equals to its MCBM | - | 0.0 | no | no | https://onlinejudge.org/external/111/11159.pdf 1262 | Kattis | 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 | no | no | https://open.kattis.com/problems/bilateral 1263 | Kattis | 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 | no | no | https://open.kattis.com/problems/europeantrip 1264 | LeetCode | lc0198 | House Robber | 8.6c | NP-hard/C, special, E | MWIS; on line graph; simple DP; leetcode-75; top-100-liked; top-interview-150 | 0 | 4.0 | yes | yes | https://leetcode.com/problems/house-robber/ 1265 | Kattis | 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 | no | no | https://open.kattis.com/problems/reactivity 1266 | UVa | 01086 | | 8.6d | NP-hard/C, special, H | LA 4452 - WorldFinals Stockholm09; can be modeled as a 2-SAT problem | - | 0.0 | no | no | https://onlinejudge.org/external/10/1086.pdf 1267 | UVa | 01096 | | 8.6d | NP-hard/C, special, H | LA 4791 - WorldFinals Harbin10; Bitonic TSP variant; print the actual path | - | 0.0 | no | no | https://onlinejudge.org/external/10/1096.pdf 1268 | UVa | 01184 | | 8.6d | NP-hard/C, special, H | LA 2696 - Dhaka02; MPC on DAG ~ MCBM | - | 0.0 | no | no | https://onlinejudge.org/external/11/1184.pdf 1269 | UVa | 01212 | | 8.6d | NP-hard/C, special, H | LA 3483 - Hangzhou05; MWIS on Bipartite Graph | - | 0.0 | no | no | https://onlinejudge.org/external/12/1212.pdf 1270 | Kattis | jailbreak | jailbreak | 8.6d | NP-hard/C, special, H | STEINER-TREE; grid; BFS from 3 vertices: 'outside' and 2 prisoners (open doors independently or meet a Steiner point fir... | 130 | 4.8 | no | no | https://open.kattis.com/problems/jailbreak 1271 | Kattis | 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 | no | no | https://open.kattis.com/problems/ridofcoins 1272 | Kattis | 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 | no | no | https://open.kattis.com/problems/wedding 1273 | UVa | 00714 | | 8.7a | BSTA+Other, Easier | binary search the answer and greedy | - | 0.0 | no | no | https://onlinejudge.org/external/7/714.pdf 1274 | UVa | 11262 | | 8.7a | BSTA+Other, Easier | binary search the answer and MCBM; similar with UVa 10804 | - | 0.0 | no | no | https://onlinejudge.org/external/112/11262.pdf 1275 | UVa | 12097 | | 8.7a | BSTA+Other, Easier | binary search the answer and geometric formula | - | 0.0 | no | no | https://onlinejudge.org/external/120/12097.pdf 1276 | Kattis | 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 | no | no | https://open.kattis.com/problems/arrivingontime 1277 | Kattis | 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 | no | no | https://open.kattis.com/problems/charlesincharge 1278 | Kattis | programmingtutors | programmingtutors | 8.7a | BSTA+Other, Easier | +perfect MCBM | 161 | 3.7 | no | no | https://open.kattis.com/problems/programmingtutors 1279 | UVa | 01221 | | 8.7b | BSTA+Other, Harder | LA 3795 - Tehran06; +MCBM | - | 0.0 | no | no | https://onlinejudge.org/external/12/1221.pdf 1280 | UVa | 10537 | | 8.7b | BSTA+Other, Harder | +Dijkstra's on State-Space graph | - | 0.0 | no | no | https://onlinejudge.org/external/105/10537.pdf 1281 | UVa | 10983 | | 8.7b | BSTA+Other, Harder | binary search the answer and max flow | - | 0.0 | no | no | https://onlinejudge.org/external/109/10983.pdf 1282 | Kattis | 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 | no | no | https://open.kattis.com/problems/catandmice 1283 | Kattis | enemyterritory | enemyterritory | 8.7b | BSTA+Other, Harder | MSSP from all enemy vertices; BSTA, run BFS from (xi, yi) to (xr, yr) avoiding vertices that are too close to any enemy | 66 | 4.2 | no | no | https://open.kattis.com/problems/enemyterritory 1284 | Kattis | gravamen | gravamen | 8.7b | BSTA+Other, Harder | BSTA + max flow | 45 | 6.1 | no | no | https://open.kattis.com/problems/gravamen 1285 | Kattis | wifi | wifi | 8.7b | BSTA+Other, Harder | +greedy; also available at UVa 11516 - WiFi | 214 | 4.3 | no | no | https://open.kattis.com/problems/wifi 1286 | UVa | 11960 | | 8.7c | Fast DS+Other, Easier | modified Sieve; number of divisors; static Range Maximum Query; use Sparse Table data structure | - | 0.0 | no | no | https://onlinejudge.org/external/119/11960.pdf 1287 | UVa | 12318 | | 8.7c | Fast DS+Other, Easier | brute force with unordered_set | - | 0.0 | no | no | https://onlinejudge.org/external/123/12318.pdf 1288 | UVa | 12460 | | 8.7c | Fast DS+Other, Easier | a simple BFS problem; use set of string data structure to speed up the check if a word is inside dictionary | - | 0.0 | no | no | https://onlinejudge.org/external/124/12460.pdf 1289 | Kattis | busnumbers2 | busnumbers2 | 8.7c | Fast DS+Other, Easier | complete search; use unordered_map | 377 | 3.0 | no | no | https://open.kattis.com/problems/busnumbers2 1290 | Kattis | quickscope | quickscope | 8.7c | Fast DS+Other, Easier | use stack of sets and hash table of stacks | 1326 | 3.9 | yes | no | https://open.kattis.com/problems/quickscope 1291 | Kattis | selfsimilarstrings | selfsimilarstrings | 8.7c | Fast DS+Other, Easier | complete search as the string is short; frequency counting; use unordered_map; repetition | 181 | 3.5 | no | no | https://open.kattis.com/problems/selfsimilarstrings 1292 | Kattis | undetected | undetected | 8.7c | Fast DS+Other, Easier | brute force; simple geometry; UFDS | 274 | 3.9 | no | no | https://open.kattis.com/problems/undetected 1293 | UVa | 00843 | | 8.7d | Fast DS+Other, Harder | backtracking; try mapping each letter to another letter in alphabet; use Trie data structure for speed up | - | 0.0 | no | no | https://onlinejudge.org/external/8/843.pdf 1294 | UVa | 11474 | | 8.7d | Fast DS+Other, Harder | UFDS; connect all tree branches; connect two reachable trees (use geometry); connect trees that can reach doctor | - | 0.0 | no | no | https://onlinejudge.org/external/114/11474.pdf 1295 | UVa | 11525 | | 8.7d | Fast DS+Other, Harder | use Fenwick Tree and binary search the answer to find the lowest index i that has RSQ(1;i) = Si | - | 0.0 | no | no | https://onlinejudge.org/external/115/11525.pdf 1296 | Kattis | 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 | no | no | https://open.kattis.com/problems/dictionaryattack 1297 | Kattis | 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 | no | no | https://open.kattis.com/problems/doublets 1298 | Kattis | 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 | no | no | https://open.kattis.com/problems/magicallights 1299 | Kattis | sparklesseven | sparklesseven | 8.7d | Fast DS+Other, Harder | seven nested loops with fast DS | 52 | 5.7 | no | no | https://open.kattis.com/problems/sparklesseven 1300 | UVa | 10012 | | 8.7e | Geometry+CS | try all 8! permutations; Euclidean dist | - | 0.0 | no | no | https://onlinejudge.org/external/100/10012.pdf 1301 | UVa | 11227 | | 8.7e | Geometry+CS | brute force; collinear test | - | 0.0 | no | no | https://onlinejudge.org/external/112/11227.pdf 1302 | Kattis | 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 | no | no | https://open.kattis.com/problems/collidingtraffic 1303 | Kattis | 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 | no | no | https://open.kattis.com/problems/cranes 1304 | Kattis | doggopher | doggopher | 8.7e | Geometry+CS | complete search; Euclidean distance dist; also available at UVa 10310 - Dog and Gopher | 119 | 2.5 | no | no | https://open.kattis.com/problems/doggopher 1305 | LeetCode | lc0149 | Max Points on a Line | 8.7e | Geometry+CS | identical with UVa 11227; top-interview-150 | 0 | 6.0 | yes | no | https://leetcode.com/problems/max-points-on-a-line/ 1306 | UVa | 11008 | | 8.7f | Geometry+Other | collinear test; DP bitmask | - | 0.0 | no | no | https://onlinejudge.org/external/110/11008.pdf 1307 | UVa | 12322 | | 8.7f | Geometry+Other | first; use atan2 to convert angles to 1D intervals; then sort it and use a greedy scan to get the answer | - | 0.0 | no | no | https://onlinejudge.org/external/123/12322.pdf 1308 | Kattis | 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 | no | no | https://open.kattis.com/problems/findinglines 1309 | Kattis | humancannonball | humancannonball | 8.7f | Geometry+Other | build the travel time graph with Euclidean distance computations; use Floyd-Warshall | 757 | 2.2 | no | no | https://open.kattis.com/problems/humancannonball 1310 | LeetCode | lc0976 | Largest Perimeter Triangle | 8.7f | Geometry+Other | sort nums in non-increasing order; do triangle inequality checks; programming-skills | 0 | 2.0 | yes | yes | https://leetcode.com/problems/largest-perimeter-triangle/ 1311 | Kattis | 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 | no | no | https://open.kattis.com/problems/walkway 1312 | UVa | 00393 | | 8.7g | Graph+Other | build the small visibility graph with line segment intersection checks; run Floyd-Warshall routine to get the answer | - | 0.0 | no | no | https://onlinejudge.org/external/3/393.pdf 1313 | UVa | 01092 | | 8.7g | Graph+Other | LA 4787 - WorldFinals Harbin10; compress graph; traversal from exit with S/W direction; inclusion-exclusion | - | 0.0 | no | no | https://onlinejudge.org/external/10/1092.pdf 1314 | UVa | 12159 | | 8.7g | Graph+Other | LA 4407 - KualaLumpur08; use simple CCW tests (geometry) to build the bipartite graph; MCBM | - | 0.0 | no | no | https://onlinejudge.org/external/121/12159.pdf 1315 | Kattis | crowdcontrol | crowdcontrol | 8.7g | Graph+Other | maximin path problem; MST; DFS from train station to BAPC; block unused edges | 100 | 3.8 | no | no | https://open.kattis.com/problems/crowdcontrol 1316 | Kattis | gears2 | gears2 | 8.7g | Graph+Other | graph reachability test; cycle with equal ratio is actually OK; math fraction | 95 | 3.7 | no | no | https://open.kattis.com/problems/gears2 1317 | Kattis | 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 | no | no | https://open.kattis.com/problems/gridmst 1318 | UVa | 01069 | | 8.7h | Mathematics+Other | LA 4119 - WorldFinals Banff08; string parsing, divisibility of polynomial, brute force, and modPow | - | 0.0 | no | no | https://onlinejudge.org/external/10/1069.pdf 1319 | UVa | 11282 | | 8.7h | Mathematics+Other | derangement and binomial coefficient; Big Integer | - | 0.0 | no | no | https://onlinejudge.org/external/112/11282.pdf 1320 | Kattis | 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 | no | no | https://open.kattis.com/problems/emergency 1321 | Kattis | industrialspy | industrialspy | 8.7h | Mathematics+Other | brute force recursive bitmask with prime check; also available at UVa 12218 - An Industrial Spy | 556 | 3.3 | no | no | https://open.kattis.com/problems/industrialspy 1322 | LeetCode | lc1071 | Greatest Common Divisor of Strings | 8.7h | Mathematics+Other | divisibility; on string; leetcode-75 | 0 | 2.0 | yes | no | https://leetcode.com/problems/greatest-common-divisor-of-strings/ 1323 | Kattis | megainversions | megainversions | 8.7h | Mathematics+Other | a bit of combinatorics; use Fenwick Tree to compute smaller/larger numbers quickly | 333 | 5.0 | no | no | https://open.kattis.com/problems/megainversions 1324 | Kattis | 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 | no | no | https://open.kattis.com/problems/ontrack 1325 | UVa | 00976 | | 8.7i | Graph+DP | flood fill to separate North and South banks; compute the cost of installing a bridge at each column; DP | - | 0.0 | no | no | https://onlinejudge.org/external/9/976.pdf 1326 | UVa | 10937 | | 8.7i | Graph+DP | BFS -> APSP information for TSP; then DP or backtracking | - | 0.0 | no | no | https://onlinejudge.org/external/109/10937.pdf 1327 | UVa | 11324 | | 8.7i | Graph+DP | LONGEST-PATH on DAG; first, transform the graph into DAG of its SCCs; toposort | - | 0.0 | no | no | https://onlinejudge.org/external/113/11324.pdf 1328 | UVa | 11331 | | 8.7i | Graph+DP | bipartite graph checks; compute size of left/right sets per bipartite component; DP SUBSET-SUM | - | 0.0 | no | no | https://onlinejudge.org/external/113/11331.pdf 1329 | Kattis | 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 | no | no | https://open.kattis.com/problems/treasurediving 1330 | Kattis | 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 | no | no | https://open.kattis.com/problems/walkforest 1331 | UVa | 10533 | | 8.7j | Other+DP 1D RSQ/RMQ | sieve; check if a prime is a digit prime; DP 1D range sum | - | 0.0 | no | no | https://onlinejudge.org/external/105/10533.pdf 1332 | UVa | 10891 | | 8.7j | Other+DP 1D RSQ/RMQ | Double DP; 1D RSQ plus another DP to evaluate decision tree; s: (i, j); try all splitting points; minimax | - | 0.0 | no | no | https://onlinejudge.org/external/108/10891.pdf 1333 | UVa | 11032 | | 8.7j | Other+DP 1D RSQ/RMQ | observation: sod(i) can be only from 1 to 63; use 1D Range Sum Query for fun(a; b) | - | 0.0 | no | no | https://onlinejudge.org/external/110/11032.pdf 1334 | UVa | 11408 | | 8.7j | Other+DP 1D RSQ/RMQ | need 1D Range Sum Query | - | 0.0 | no | no | https://onlinejudge.org/external/114/11408.pdf 1335 | Kattis | 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 | no | no | https://open.kattis.com/problems/centsavings 1336 | Kattis | dvoniz | dvoniz | 8.7j | Other+DP 1D RSQ/RMQ | involving 1D RSQ DP; binary search the answer | 47 | 7.1 | no | no | https://open.kattis.com/problems/dvoniz 1337 | Kattis | 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 | no | no | https://open.kattis.com/problems/program 1338 | UVa | 00295 | | 8.7k | Three++ Components, E | BSTA x: if the person has diameter x, can he go from left to right? graph connectivity; similar with UVa 10876 | - | 0.0 | no | no | https://onlinejudge.org/external/2/295.pdf 1339 | UVa | 01250 | | 8.7k | Three++ Components, E | LA 4607 - SoutheastUSA09; geometry; SSSP on DAG -> DP; DP 1D range sum | - | 0.0 | no | no | https://onlinejudge.org/external/12/1250.pdf 1340 | Kattis | beeproblem | beeproblem | 8.7k | Three++ Components, E | transform bee grid into 2D grid; compute size of each CCs; sort; greedy | 156 | 4.9 | no | no | https://open.kattis.com/problems/beeproblem 1341 | Kattis | gettingthrough | gettingthrough | 8.7k | Three++ Components, E | BSTA+graph connectivity; Union-Find; similar to UVa 00295 | 51 | 7.2 | no | no | https://open.kattis.com/problems/gettingthrough 1342 | LeetCode | lc2300 | Successful Pairs of Spells and Potions | 8.7k | Three++ Components, E | sort potions; try all spells and BSTA each time; leetcode-75 | 0 | 4.0 | yes | no | https://leetcode.com/problems/successful-pairs-of-spells-and-potions/ 1343 | Kattis | 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 | no | no | https://open.kattis.com/problems/researchproductivityindex 1344 | UVa | 00811 | | 8.7l | Three++ Components, H | LA 5211 - WorldFinals Eindhoven99; get CH and perimeter of polygon; generate all subsets iteratively with bitmask | - | 0.0 | no | no | https://onlinejudge.org/external/8/811.pdf 1345 | UVa | 01040 | | 8.7l | Three++ Components, H | LA 3271 - WorldFinals Shanghai05; try all subsets of 2^20 cities; MST; complex output formatting | - | 0.0 | no | no | https://onlinejudge.org/external/10/1040.pdf 1346 | UVa | 01079 | | 8.7l | Three++ Components, H | LA 4445 - WorldFinals Stockholm09; iterative complete search (permutation); BSTA + greedy | - | 0.0 | no | no | https://onlinejudge.org/external/10/1079.pdf 1347 | Kattis | 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 | no | no | https://open.kattis.com/problems/carpool 1348 | Kattis | 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 | no | no | https://open.kattis.com/problems/clockpictures 1349 | Kattis | 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 | no | no | https://open.kattis.com/problems/guessthenumbers 1350 | UVa | 00588 | | 9.artg | Art Gallery | cutPolygon | - | 0.0 | no | no | https://onlinejudge.org/external/5/588.pdf 1351 | UVa | 01304 | | 9.artg | Art Gallery | LA 2512 - SouthEasternEurope02; cutPolygon and area of polygon | - | 0.0 | no | no | https://onlinejudge.org/external/13/1304.pdf 1352 | UVa | 01571 | | 9.artg | Art Gallery | LA 3617 - Yokohama06; cutPolygon | - | 0.0 | no | no | https://onlinejudge.org/external/15/1571.pdf 1353 | UVa | 10078 | | 9.artg | Art Gallery | isConvex | - | 0.0 | no | no | https://onlinejudge.org/external/100/10078.pdf 1354 | UVa | 00652 | | 9.asta | A* or IDA* | classic sliding block 8-puzzle; IDA* | - | 0.0 | no | no | https://onlinejudge.org/external/6/652.pdf 1355 | UVa | 00656 | | 9.asta | A* or IDA* | we can use IDDFS with pruning | - | 0.0 | no | no | https://onlinejudge.org/external/6/656.pdf 1356 | UVa | 10181 | | 9.asta | A* or IDA* | similar with UVa 652 but larger (now 15 instead of 8); we can use IDA* | - | 0.0 | no | no | https://onlinejudge.org/external/101/10181.pdf 1357 | UVa | 11163 | | 9.asta | A* or IDA* | another puzzle game solvable with IDA* | - | 0.0 | no | no | https://onlinejudge.org/external/111/11163.pdf 1358 | Kattis | joggingtrails | joggingtrails | 9.chi1 | Chinese Postman | basic Chinese Postman Problem; also available at UVa 10296 - Jogging Trails | 75 | 5.0 | no | no | https://open.kattis.com/problems/joggingtrails 1359 | UVa | 00756 | | 9.chi2 | Chinese Remainder | CRT or brute force | - | 0.0 | no | no | https://onlinejudge.org/external/7/756.pdf 1360 | Kattis | chineseremainder | chineseremainder | 9.chi2 | Chinese Remainder | basic CRT; 2 linear congruences; Big Integer | 343 | 5.4 | no | no | https://open.kattis.com/problems/chineseremainder 1361 | Kattis | generalchineseremainder | generalchineseremainder | 9.chi2 | Chinese Remainder | general CRT; 2 linear congruences | 362 | 3.7 | no | no | https://open.kattis.com/problems/generalchineseremainder 1362 | Kattis | granica | granica | 9.chi2 | Chinese Remainder | CRT; GCD of all N differences of 2 numbers | 95 | 6.2 | no | no | https://open.kattis.com/problems/granica 1363 | Kattis | heliocentric | heliocentric | 9.chi2 | Chinese Remainder | CRT or brute force | 1030 | 1.8 | no | no | https://open.kattis.com/problems/heliocentric 1364 | Kattis | remainderreminder | remainderreminder | 9.chi2 | Chinese Remainder | a bit of brute force + sorting; generalized CRT | 124 | 5.2 | no | no | https://open.kattis.com/problems/remainderreminder 1365 | UVa | 10245 | | 9.clos | Closest Pair | classic | - | 0.0 | no | no | https://onlinejudge.org/external/102/10245.pdf 1366 | UVa | 11378 | | 9.clos | Closest Pair | also a closest pair problem | - | 0.0 | no | no | https://onlinejudge.org/external/113/11378.pdf 1367 | Kattis | closestpair1 | closestpair1 | 9.clos | Closest Pair | classic closest pair problem - the easier one | 269 | 5.7 | no | no | https://open.kattis.com/problems/closestpair1 1368 | UVa | 10165 | | 9.comb | Comb Game Theory | Nim game; application of Sprague-Grundy theorem | - | 0.0 | no | no | https://onlinejudge.org/external/101/10165.pdf 1369 | UVa | 11311 | | 9.comb | Comb Game Theory | there are 4 heaps; Nim sum | - | 0.0 | no | no | https://onlinejudge.org/external/113/11311.pdf 1370 | UVa | 01266 | | 9.cons | Construction | LA 3478 - LatinAmerica05; follow the given construction strategy | - | 0.0 | no | no | https://onlinejudge.org/external/12/1266.pdf 1371 | UVa | 10741 | | 9.cons | Construction | similar idea as 2D Magic Square; but now in 3D; just follow the given construction strategy | - | 0.0 | no | no | https://onlinejudge.org/external/107/10741.pdf 1372 | Kattis | 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 | no | no | https://open.kattis.com/problems/base2palindrome 1373 | Kattis | espressobucks | espressobucks | 9.cons | Construction | easy brute force construction; small nxm; not about Min-Vertex-Cover | 159 | 2.4 | no | no | https://open.kattis.com/problems/espressobucks 1374 | Kattis | exofficio | exofficio | 9.cons | Construction | we can use BFS spanning tree from center of the grid; be careful of corner cases | 41 | 7.5 | no | no | https://open.kattis.com/problems/exofficio 1375 | Kattis | plowking | plowking | 9.cons | Construction | greedy construction; reverse MST problem | 92 | 3.2 | no | no | https://open.kattis.com/problems/plowking 1376 | Kattis | poplava | poplava | 9.cons | Construction | actually there is a rather simple construction algorithm to achieve the required requirement | 105 | 3.4 | no | no | https://open.kattis.com/problems/poplava 1377 | UVa | 10506 | | 9.debr | De Bruijn Sequence | any valid solution is AC; generate all possible next digit (up to base 10/digit [0..9]); check if it is still a valid Ou... | - | 0.0 | no | no | https://onlinejudge.org/external/105/10506.pdf 1378 | UVa | 11439 | | 9.edmo | Edmonds' Matching | BSTA (the minimum weight); use it to reconstruct the graph; perfect matching on medium-sized general graph | - | 0.0 | no | no | https://onlinejudge.org/external/114/11439.pdf 1379 | UVa | 10934 | | 9.eggd | Egg Dropping Puzzle | Egg dropping puzzle; interesting DP; try all possible answers | - | 0.0 | no | no | https://onlinejudge.org/external/109/10934.pdf 1380 | Kattis | batteries | batteries | 9.eggd | Egg Dropping Puzzle | Egg dropping puzzle with just 2 batteries; special case | 146 | 3.6 | no | no | https://open.kattis.com/problems/batteries 1381 | Kattis | powereggs | powereggs | 9.eggd | Egg Dropping Puzzle | Egg dropping puzzle; similar to UVa 10934 | 92 | 5.2 | no | no | https://open.kattis.com/problems/powereggs 1382 | Kattis | 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 | no | no | https://open.kattis.com/problems/golfbot 1383 | Kattis | 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 | no | no | https://open.kattis.com/problems/polymul2 1384 | UVa | 01645 | | 9.form | Formulas/Theorems | LA 6368 - Chengdu12; number of rooted trees with n vertices in which vertices at the same level have the same degree | - | 0.0 | no | no | https://onlinejudge.org/external/16/1645.pdf 1385 | UVa | 11719 | | 9.form | Formulas/Theorems | count the number of spanning tree in a complete bipartite graph; use Java BigInteger | - | 0.0 | no | no | https://onlinejudge.org/external/117/11719.pdf 1386 | UVa | 12786 | | 9.form | Formulas/Theorems | similar to UVa 10720 and 11414; Erdos-Gallai Theorem | - | 0.0 | no | no | https://onlinejudge.org/external/127/12786.pdf 1387 | UVa | 13108 | | 9.form | Formulas/Theorems | Moser's circle; the formula is hard to derive; g(n) = nC4 + nC2 + 1 | - | 0.0 | no | no | https://onlinejudge.org/external/131/13108.pdf 1388 | Kattis | 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 | no | no | https://open.kattis.com/problems/houseofcards 1389 | Kattis | janitortroubles | janitortroubles | 9.form | Formulas/Theorems | Brahmagupta's formula | 745 | 1.5 | no | no | https://open.kattis.com/problems/janitortroubles 1390 | Kattis | sjecista | sjecista | 9.form | Formulas/Theorems | number of intersections of diagonals in a convex polygon | 581 | 1.9 | no | no | https://open.kattis.com/problems/sjecista 1391 | UVa | 00684 | | 9.gaus | Gauss Elimination | modified Gaussian elimination to find (integral) determinant of a square matrix | - | 0.0 | no | no | https://onlinejudge.org/external/6/684.pdf 1392 | UVa | 11319 | | 9.gaus | Gauss Elimination | solve the system of the first 7 linear equations; then use all 1500 equations for 'smart sequence' checks | - | 0.0 | no | no | https://onlinejudge.org/external/113/11319.pdf 1393 | Kattis | 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 | no | no | https://open.kattis.com/problems/seti 1394 | Kattis | pizza | pizza | 9.grad | Gradient Descent | gradient descent | 252 | 4.5 | no | no | https://open.kattis.com/problems/pizza 1395 | Kattis | amazing | amazing | 9.inte | Interactive Problem | run DFS and react based on the output of the program | 215 | 5.2 | no | no | https://open.kattis.com/problems/amazing 1396 | Kattis | askmarilyn | askmarilyn | 9.inte | Interactive Problem | the famous Monty hall problem in interactive format | 135 | 4.2 | no | no | https://open.kattis.com/problems/askmarilyn 1397 | Kattis | blackout | blackout | 9.inte | Interactive Problem | interactive game theory; block one row; mirror jury's move | 129 | 3.1 | no | no | https://open.kattis.com/problems/blackout 1398 | Kattis | crusaders | crusaders | 9.inte | Interactive Problem | another nice interactive problem about binary search | 34 | 7.4 | no | no | https://open.kattis.com/problems/crusaders 1399 | Kattis | guess | guess | 9.inte | Interactive Problem | interactive problem; binary search | 1682 | 2.7 | no | no | https://open.kattis.com/problems/guess 1400 | UVa | 01045 | | 9.kuhn | Kuhn-Munkres | LA 3276 - WorldFinals Shanghai05; try all configurations; weighted matching; pick the best; Kuhn-Munkres | - | 0.0 | no | no | https://onlinejudge.org/external/10/1045.pdf 1401 | UVa | 10746 | | 9.kuhn | Kuhn-Munkres | min weighted bipartite matching | - | 0.0 | no | no | https://onlinejudge.org/external/107/10746.pdf 1402 | UVa | 10888 | | 9.kuhn | Kuhn-Munkres | BFS/SSSP; min weighted bipartite matching | - | 0.0 | no | no | https://onlinejudge.org/external/108/10888.pdf 1403 | UVa | 11553 | | 9.kuhn | Kuhn-Munkres | brute force; DP bitmask; or Hungarian | - | 0.0 | no | no | https://onlinejudge.org/external/115/11553.pdf 1404 | Kattis | aqueducts | aqueducts | 9.kuhn | Kuhn-Munkres | build bipartite graph; weighted MCBM; Hungarian | 51 | 6.0 | no | no | https://open.kattis.com/problems/aqueducts 1405 | Kattis | engaging | engaging | 9.kuhn | Kuhn-Munkres | LA 8437 - HoChiMinhCity17; Hungarian; print solution | 135 | 5.8 | no | no | https://open.kattis.com/problems/engaging 1406 | Kattis | cheeseifyouplease | cheeseifyouplease | 9.line | Linear Programming | simple Linear Programming problem; use Simplex | 51 | 3.3 | no | no | https://open.kattis.com/problems/cheeseifyouplease 1407 | Kattis | 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 | no | no | https://open.kattis.com/problems/maximumrent 1408 | UVa | 10938 | | 9.lowe | Lowest Common Anc | basic LCA problem | - | 0.0 | no | no | https://onlinejudge.org/external/109/10938.pdf 1409 | UVa | 12238 | | 9.lowe | Lowest Common Anc | similar to UVa 10938 | - | 0.0 | no | no | https://onlinejudge.org/external/122/12238.pdf 1410 | Kattis | chewbacca | chewbacca | 9.lowe | Lowest Common Anc | complete short k-ary tree; binary heap indexing; LCA | 186 | 3.6 | no | no | https://open.kattis.com/problems/chewbacca 1411 | UVa | 00348 | | 9.matr | Matrix Chain Mult | DP; s(i, j); output the optimal solution; the optimal sequence is not unique | - | 0.0 | no | no | https://onlinejudge.org/external/3/348.pdf 1412 | UVa | 10594 | | 9.minc | Min Cost (Max) Flow | basic min cost max flow problem | - | 0.0 | no | no | https://onlinejudge.org/external/105/10594.pdf 1413 | UVa | 10806 | | 9.minc | Min Cost (Max) Flow | send 2 edge-disjoint flows with min cost | - | 0.0 | no | no | https://onlinejudge.org/external/108/10806.pdf 1414 | UVa | 11301 | | 9.minc | Min Cost (Max) Flow | modeling; vertex capacity; MCMF | - | 0.0 | no | no | https://onlinejudge.org/external/113/11301.pdf 1415 | UVa | 12821 | | 9.minc | Min Cost (Max) Flow | similar to UVa 10806 | - | 0.0 | no | no | https://onlinejudge.org/external/128/12821.pdf 1416 | Kattis | catering | catering | 9.minc | Min Cost (Max) Flow | LA 7152 - WorldFinals Marrakech15; MCMF modeling | 246 | 3.9 | no | no | https://open.kattis.com/problems/catering 1417 | Kattis | mincostmaxflow | mincostmaxflow | 9.minc | Min Cost (Max) Flow | very basic MCMF problem; good starting point | 232 | 5.3 | no | no | https://open.kattis.com/problems/mincostmaxflow 1418 | Kattis | ragingriver | ragingriver | 9.minc | Min Cost (Max) Flow | MCMF; unit capacity and unit cost | 96 | 7.1 | no | no | https://open.kattis.com/problems/ragingriver 1419 | UVa | 00120 | | 9.panc | Pancake Sorting | greedy pancake sorting | - | 0.0 | no | no | https://onlinejudge.org/external/1/120.pdf 1420 | LeetCode | lc0969 | Pancake Sorting | 9.panc | Pancake Sorting | the easier form of Pancake Sorting; flip largest to top (index 1), then to target; at most 2*n flips | 0 | 4.0 | yes | no | https://leetcode.com/problems/pancake-sorting/ 1421 | UVa | 11476 | | 9.poll | Pollard's rho | basic integer factorization problem that requires Pollard's rho algorithm | - | 0.0 | no | no | https://onlinejudge.org/external/114/11476.pdf 1422 | LeetCode | lc0169 | Majority Element | 9.rand | Randomized Algo | try a random number and see if it is the majority element, repeat; top-100-liked; top-interview-150 | 0 | 2.0 | yes | yes | https://leetcode.com/problems/majority-element/ 1423 | LeetCode | lc0398 | Random Pick Index | 9.rand | Randomized Algo | separate chaining; record indices of each value; randomly return a valid index | 0 | 4.0 | yes | no | https://leetcode.com/problems/random-pick-index/ 1424 | LeetCode | lc0519 | Random Flip Matrix | 9.rand | Randomized Algo | randomly pick (r, c) inside the grid; repeat if it has been taken | 0 | 4.0 | yes | no | https://leetcode.com/problems/random-flip-matrix/ 1425 | Kattis | 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 | no | no | https://open.kattis.com/problems/cardboardcontainer 1426 | Kattis | modulodatastructures | modulodatastructures | 9.sqrt | Square Root Decomp | basic problem that can be solved with Square Root Decomposition technique | 277 | 4.6 | no | no | https://open.kattis.com/problems/modulodatastructures 1427 | UVa | 00254 | | 9.towe | Tower of Hanoi | define a recursive formula | - | 0.0 | no | no | https://onlinejudge.org/external/2/254.pdf 1428 | UVa | 10017 | | 9.towe | Tower of Hanoi | classical problem | - | 0.0 | no | no | https://onlinejudge.org/external/100/10017.pdf 1429 | UVa | 10254 | | 9.towe | Tower of Hanoi | find pattern; use Java BigInteger | - | 0.0 | no | no | https://onlinejudge.org/external/102/10254.pdf