General
+-
+
- + Introduction + +
- + Create new account + +
- + Statistics + +
Introductory Problems
+-
+
- + Weird Algorithm144995 / 151869 + + +
- + Missing Number124841 / 130996 + + +
- + Repetitions108866 / 113377 + + +
- + Increasing Array102195 / 105948 + + +
- + Permutations89881 / 92690 + + +
- + Number Spiral63539 / 69295 + + +
- + Two Knights48484 / 50043 + + +
- + Two Sets52727 / 56813 + + +
- + Bit Strings60431 / 63824 + + +
- + Trailing Zeros56456 / 60095 + + +
- + Coin Piles49954 / 54706 + + +
- + Palindrome Reorder46295 / 48924 + + +
- + Gray Code30780 / 34663 + + +
- + Tower of Hanoi28454 / 29595 + + +
- + Creating Strings39109 / 40137 + + +
- + Apple Division39058 / 44218 + + +
- + Chessboard and Queens23584 / 24017 + + +
- + Raab Game I3083 / 3526 + + +
- + Mex Grid Construction2932 / 3144 + + +
- + Knight Moves Grid2966 / 3035 + + +
- + Grid Coloring I2436 / 2523 + + +
- + Digit Queries16660 / 19489 + + +
- + String Reorder2434 / 2835 + + +
- + Grid Path Description9299 / 12110 + + +
Sorting and Searching
+-
+
- + Distinct Numbers70563 / 76445 + + +
- + Apartments52298 / 58272 + + +
- + Ferris Wheel50166 / 54264 + + +
- + Concert Tickets40399 / 47166 + + +
- + Restaurant Customers41192 / 44521 + + +
- + Movie Festival39520 / 41902 + + +
- + Sum of Two Values46091 / 51726 + + +
- + Maximum Subarray Sum44738 / 46767 + + +
- + Stick Lengths39921 / 41810 + + +
- + Missing Coin Sum29904 / 31027 + + +
- + Collecting Numbers30676 / 32904 + + +
- + Collecting Numbers II12658 / 16288 + + +
- + Playlist30739 / 35266 + + +
- + Towers31103 / 33363 + + +
- + Traffic Lights24035 / 26976 + + +
- + Distinct Values Subarrays4598 / 4846 + + +
- + Distinct Values Subsequences3184 / 3567 + + +
- + Josephus Problem I18259 / 20210 + + +
- + Josephus Problem II9821 / 13579 + + +
- + Nested Ranges Check10426 / 12054 + + +
- + Nested Ranges Count7076 / 8372 + + +
- + Room Allocation18100 / 20846 + + +
- + Factory Machines25568 / 27952 + + +
- + Tasks and Deadlines20722 / 21178 + + +
- + Reading Books16795 / 17999 + + +
- + Sum of Three Values24569 / 27285 + + +
- + Sum of Four Values15315 / 17140 + + +
- + Nearest Smaller Values20514 / 21221 + + +
- + Subarray Sums I27067 / 28948 + + +
- + Subarray Sums II24441 / 29183 + + +
- + Subarray Divisibility22492 / 24585 + + +
- + Distinct Values Subarrays II13277 / 14718 + + +
- + Array Division21255 / 22391 + + +
- + Movie Festival II11305 / 13688 + + +
- + Maximum Subarray Sum II10453 / 12551 + + +
Dynamic Programming
+-
+
- + Dice Combinations73809 / 78155 + + +
- + Minimizing Coins63795 / 68610 + + +
- + Coin Combinations I58289 / 63185 + + +
- + Coin Combinations II49272 / 55903 + + +
- + Removing Digits54985 / 56139 + + +
- + Grid Paths I51589 / 53080 + + +
- + Book Shop46105 / 50839 + + +
- + Array Description33886 / 37741 + + +
- + Counting Towers20500 / 21744 + + +
- + Edit Distance34164 / 36075 + + +
- + Longest Common Subsequence6313 / 6560 + + +
- + Rectangle Cutting28416 / 31056 + + +
- + Minimal Grid Path2690 / 5181 + + +
- + Money Sums33692 / 35013 + + +
- + Removal Game19667 / 26936 + + +
- + Two Sets II26557 / 28651 + + +
- + Mountain Range1855 / 3636 + + +
- + Increasing Subsequence27124 / 30487 + + +
- + Projects18655 / 20942 + + +
- + Elevator Rides11799 / 14933 + + +
- + Counting Tilings6862 / 7509 + + +
- + Counting Numbers9305 / 10548 + + +
- + Increasing Subsequence II3485 / 4038 + + +
Graph Algorithms
+-
+
- + Counting Rooms50679 / 53299 + + +
- + Labyrinth35018 / 42157 + + +
- + Building Roads44351 / 45973 + + +
- + Message Route38073 / 39628 + + +
- + Building Teams35929 / 37960 + + +
- + Round Trip28550 / 31165 + + +
- + Monsters19360 / 22995 + + +
- + Shortest Routes I31031 / 34398 + + +
- + Shortest Routes II25338 / 28508 + + +
- + High Score15228 / 21883 + + +
- + Flight Discount19833 / 23340 + + +
- + Cycle Finding14107 / 17440 + + +
- + Flight Routes13764 / 15390 + + +
- + Round Trip II15762 / 17751 + + +
- + Course Schedule20652 / 21884 + + +
- + Longest Flight Route14424 / 18093 + + +
- + Game Routes16261 / 17474 + + +
- + Investigation12037 / 12976 + + +
- + Planets Queries I10435 / 12290 + + +
- + Planets Queries II3723 / 4743 + + +
- + Planets Cycles6409 / 7177 + + +
- + Road Reparation15735 / 16415 + + +
- + Road Construction17320 / 17882 + + +
- + Flight Routes Check14077 / 15296 + + +
- + Planets and Kingdoms11284 / 11692 + + +
- + Giant Pizza4602 / 5089 + + +
- + Coin Collector7278 / 8107 + + +
- + Mail Delivery6092 / 6686 + + +
- + De Bruijn Sequence3166 / 3320 + + +
- + Teleporters Path4592 / 5302 + + +
- + Hamiltonian Flights6897 / 7894 + + +
- + Knight's Tour2558 / 3124 + + +
- + Download Speed4513 / 6152 + + +
- + Police Chase3621 / 4083 + + +
- + School Dance4008 / 4248 + + +
- + Distinct Routes2757 / 3654 + + +
Range Queries
+-
+
- + Static Range Sum Queries34854 / 36436 + + +
- + Static Range Minimum Queries24589 / 26364 + + +
- + Dynamic Range Sum Queries25571 / 26720 + + +
- + Dynamic Range Minimum Queries23177 / 23739 + + +
- + Range Xor Queries23975 / 24305 + + +
- + Range Update Queries18908 / 20312 + + +
- + Forest Queries19316 / 20065 + + +
- + Hotel Queries13636 / 14519 + + +
- + List Removals11348 / 11963 + + +
- + Salary Queries8367 / 10664 + + +
- + Prefix Sum Queries7190 / 7810 + + +
- + Pizzeria Queries5799 / 6031 + + +
- + Visible Buildings Queries1013 / 1109 + + +
- + Range Interval Queries799 / 1058 + + +
- + Subarray Sum Queries7003 / 7625 + + +
- + Subarray Sum Queries II1099 / 1134 + + +
- + Distinct Values Queries6391 / 7968 + + +
- + Distinct Values Queries II625 / 729 + + +
- + Increasing Array Queries2464 / 2831 + + +
- + Movie Festival Queries1170 / 1302 + + +
- + Forest Queries II4206 / 4536 + + +
- + Range Updates and Sums5567 / 6655 + + +
- + Polynomial Queries4104 / 4825 + + +
- + Range Queries and Copies2914 / 3132 + + +
- + Missing Coin Sum Queries572 / 761 + + +
Tree Algorithms
+-
+
- + Subordinates29219 / 31286 + + +
- + Tree Matching16551 / 19358 + + +
- + Tree Diameter23797 / 25262 + + +
- + Tree Distances I18087 / 19478 + + +
- + Tree Distances II14872 / 15515 + + +
- + Company Queries I16481 / 17360 + + +
- + Company Queries II15440 / 16211 + + +
- + Distance Queries14076 / 15131 + + +
- + Counting Paths8757 / 9307 + + +
- + Subtree Queries10541 / 11263 + + +
- + Path Queries8375 / 8878 + + +
- + Path Queries II3365 / 5088 + + +
- + Distinct Colors8124 / 8996 + + +
- + Finding a Centroid6553 / 6832 + + +
- + Fixed-Length Paths I3093 / 4045 + + +
- + Fixed-Length Paths II1432 / 2677 + + +
Mathematics
+-
+
- + Josephus Queries4436 / 5596 + + +
- + Exponentiation23046 / 24626 + + +
- + Exponentiation II16341 / 19648 + + +
- + Counting Divisors20881 / 23615 + + +
- + Common Divisors13715 / 15978 + + +
- + Sum of Divisors7627 / 11538 + + +
- + Divisor Analysis5193 / 6997 + + +
- + Prime Multiples5904 / 6933 + + +
- + Counting Coprime Pairs3847 / 4526 + + +
- + Next Prime1215 / 1390 + + +
- + Binomial Coefficients9652 / 10735 + + +
- + Creating Strings II8132 / 8603 + + +
- + Distributing Apples7828 / 8432 + + +
- + Christmas Party6284 / 6764 + + +
- + Permutation Order563 / 572 + + +
- + Permutation Rounds646 / 720 + + +
- + Bracket Sequences I4319 / 4712 + + +
- + Bracket Sequences II2238 / 2578 + + +
- + Counting Necklaces2069 / 2245 + + +
- + Counting Grids1682 / 1799 + + +
- + Fibonacci Numbers6673 / 8407 + + +
- + Throwing Dice3460 / 3766 + + +
- + Graph Paths I3277 / 3521 + + +
- + Graph Paths II2740 / 2874 + + +
- + System of Linear Equations283 / 305 + + +
- + Sum of Four Squares432 / 506 + + +
- + Triangle Number Sums368 / 458 + + +
- + Dice Probability2976 / 3218 + + +
- + Moving Robots1531 / 1623 + + +
- + Candy Lottery1252 / 2818 + + +
- + Inversion Probability277 / 2169 + + +
- + Stick Game3327 / 3406 + + +
- + Nim Game I4382 / 4551 + + +
- + Nim Game II3473 / 3624 + + +
- + Stair Game2361 / 2570 + + +
- + Grundy's Game1613 / 2136 + + +
- + Another Game1828 / 1976 + + +
String Algorithms
+-
+
- + Word Combinations5570 / 8147 + + +
- + String Matching10879 / 14646 + + +
- + Finding Borders7947 / 8707 + + +
- + Finding Periods5666 / 6445 + + +
- + Minimal Rotation2748 / 4235 + + +
- + Longest Palindrome4175 / 5537 + + +
- + All Palindromes419 / 477 + + +
- + Required Substring1572 / 2437 + + +
- + Palindrome Queries1965 / 2296 + + +
- + Finding Patterns1800 / 2593 + + +
- + Counting Patterns1701 / 2124 + + +
- + Pattern Positions1421 / 1746 + + +
- + Distinct Substrings1624 / 1946 + + +
- + Distinct Subsequences1016 / 1085 + + +
- + Repeating Substring1763 / 2069 + + +
- + String Functions1548 / 1624 + + +
- + Inverse Suffix Array146 / 168 + + +
- + String Transform492 / 604 + + +
- + Substring Order I1105 / 1244 + + +
- + Substring Order II731 / 948 + + +
- + Substring Distribution1029 / 1122 + + +
Geometry
+-
+
- + Point Location Test6924 / 7746 + + +
- + Line Segment Intersection4130 / 5224 + + +
- + Polygon Area4809 / 5106 + + +
- + Point in Polygon2623 / 3335 + + +
- + Polygon Lattice Points2219 / 2300 + + +
- + Minimum Euclidean Distance1921 / 2677 + + +
- + Convex Hull3157 / 3818 + + +
- + Maximum Manhattan Distances396 / 406 + + +
- + All Manhattan Distances399 / 437 + + +
- + Intersection Points1866 / 2008 + + +
- + Line Segments Trace I216 / 223 + + +
- + Line Segments Trace II171 / 183 + + +
- + Lines and Queries I233 / 242 + + +
- + Lines and Queries II197 / 206 + + +
- + Area of Rectangles1052 / 1179 + + +
- + Robot Path293 / 507 + + +
Advanced Techniques
+-
+
- + Meet in the Middle6364 / 8946 + + +
- + Hamming Distance3112 / 3389 + + +
- + Corner Subgrid Check204 / 344 + + +
- + Corner Subgrid Count2168 / 2434 + + +
- + Reachable Nodes2154 / 2320 + + +
- + Reachability Queries1438 / 1705 + + +
- + Cut and Paste1431 / 1593 + + +
- + Substring Reversals1254 / 1371 + + +
- + Reversals and Sums1262 / 1364 + + +
- + Necessary Roads1847 / 1891 + + +
- + Necessary Cities1718 / 1804 + + +
- + Eulerian Subgraphs756 / 797 + + +
- + Monster Game I1094 / 1220 + + +
- + Monster Game II972 / 1046 + + +
- + Subarray Squares1285 / 1534 + + +
- + Houses and Schools719 / 861 + + +
- + Knuth Division873 / 991 + + +
- + Apples and Bananas961 / 1045 + + +
- + One Bit Positions782 / 859 + + +
- + Signal Processing727 / 783 + + +
- + New Roads Queries2059 / 2512 + + +
- + Dynamic Connectivity922 / 1046 + + +
- + Parcel Delivery712 / 793 + + +
- + Task Assignment833 / 885 + + +
- + Distinct Routes II544 / 627 + + +
Sliding Window Problems
+-
+
- + Sliding Window Sum3123 / 3271 + + +
- + Sliding Window Minimum2436 / 2782 + + +
- + Sliding Window Xor2347 / 2377 + + +
- + Sliding Window Or990 / 1827 + + +
- + Sliding Window Distinct Values1965 / 2004 + + +
- + Sliding Window Mode1374 / 1446 + + +
- + Sliding Window Mex1220 / 1285 + + +
- + Sliding Window Median13023 / 14925 + + +
- + Sliding Window Cost8661 / 10006 + + +
- + Sliding Window Inversions696 / 744 + + +
- + Sliding Window Advertisement132 / 210 + + +
Interactive Problems
+-
+
- + Hidden Integer1308 / 1350 + + +
- + Hidden Permutation576 / 681 + + +
- + K-th Highest Score241 / 296 + + +
- + Permuted Binary Strings332 / 342 + + +
- + Colored Chairs281 / 296 + + +
- + Inversion Sorting168 / 177 + + +
Bitwise Operations
+-
+
- + Counting Bits4250 / 5466 + + +
- + Maximum Xor Subarray2608 / 2925 + + +
- + Maximum Xor Subset602 / 650 + + +
- + Number of Subset Xors518 / 529 + + +
- + K Subset Xors251 / 294 + + +
- + All Subarray Xors179 / 274 + + +
- + Xor Pyramid Peak1790 / 2202 + + +
- + Xor Pyramid Diagonal200 / 225 + + +
- + Xor Pyramid Row166 / 190 + + +
- + SOS Bit Problem1850 / 1977 + + +
- + And Subset Count251 / 255 + + +
Construction Problems
+-
+
- + Inverse Inversions1302 / 1388 + + +
- + Monotone Subsequences789 / 928 + + +
- + Third Permutation245 / 284 + + +
- + Permutation Prime Sums241 / 261 + + +
- + Chess Tournament1081 / 1248 + + +
- + Distinct Sums Grid67 / 117 + + +
- + Filling Trominos222 / 382 + + +
- + Grid Path Construction112 / 412 + + +
Advanced Graph Problems
+-
+
- + Nearest Shops459 / 597 + + +
- + Prüfer Code1392 / 1506 + + +
- + Tree Traversals1093 / 1206 + + +
- + Course Schedule II1706 / 2456 + + +
- + Acyclic Graph Edges2060 / 2190 + + +
- + Strongly Connected Edges1428 / 1584 + + +
- + Even Outdegree Edges1221 / 1440 + + +
- + Graph Girth3118 / 3577 + + +
- + Fixed Length Walk Queries243 / 260 + + +
- + Transfer Speeds Sum271 / 278 + + +
- + MST Edge Check346 / 372 + + +
- + MST Edge Set Check145 / 165 + + +
- + MST Edge Cost248 / 259 + + +
- + Network Breakdown927 / 983 + + +
- + Tree Coin Collecting I203 / 226 + + +
- + Tree Coin Collecting II108 / 124 + + +
- + Tree Isomorphism I1002 / 1199 + + +
- + Tree Isomorphism II813 / 954 + + +
- + Flight Route Requests442 / 538 + + +
- + Critical Cities380 / 585 + + +
- + Visiting Cities626 / 834 + + +
- + Graph Coloring135 / 160 + + +
- + Bus Companies168 / 171 + + +
- + Split into Two Paths58 / 103 + + +
- + Network Renovation879 / 1175 + + +
- + Forbidden Cities745 / 983 + + +
- + Creating Offices383 / 497 + + +
- + New Flight Routes285 / 763 + + +
Counting Problems
+-
+
- + Filled Subgrid Count I330 / 366 + + +
- + Filled Subgrid Count II172 / 205 + + +
- + All Letter Subgrid Count I81 / 137 + + +
- + All Letter Subgrid Count II67 / 78 + + +
- + Border Subgrid Count I60 / 106 + + +
- + Border Subgrid Count II63 / 73 + + +
- + Raab Game II61 / 73 + + +
- + Empty String1486 / 1814 + + +
- + Permutation Inversions937 / 1029 + + +
- + Counting Bishops353 / 396 + + +
- + Counting Sequences605 / 651 + + +
- + Grid Paths II698 / 870 + + +
- + Counting Permutations819 / 928 + + +
- + Grid Completion204 / 259 + + +
- + Counting Reorders214 / 313 + + +
- + Tournament Graph Distribution68 / 70 + + +
- + Collecting Numbers Distribution72 / 74 + + +
- + Functional Graph Distribution218 / 273 + + +
Additional Problems I
+-
+
- + Shortest Subsequence2813 / 3740 + + +
- + Distinct Values Sum404 / 415 + + +
- + Distinct Values Splits282 / 300 + + +
- + Swap Game1906 / 2425 + + +
- + Beautiful Permutation II211 / 307 + + +
- + Multiplication Table6073 / 6794 + + +
- + Bubble Sort Rounds I215 / 248 + + +
- + Bubble Sort Rounds II114 / 134 + + +
- + Nearest Campsites I98 / 115 + + +
- + Nearest Campsites II95 / 105 + + +
- + Advertisement3981 / 4219 + + +
- + Special Substrings903 / 989 + + +
- + Counting LCM Arrays164 / 176 + + +
- + Square Subsets129 / 145 + + +
- + Subarray Sum Constraints149 / 160 + + +
- + Water Containers Moves94 / 102 + + +
- + Water Containers Queries125 / 130 + + +
- + Stack Weights538 / 641 + + +
- + Maximum Average Subarrays96 / 107 + + +
- + Subsets with Fixed Average126 / 136 + + +
- + Two Array Average115 / 130 + + +
- + Pyramid Array660 / 799 + + +
- + Permutation Subsequence139 / 142 + + +
- + Bit Inversions2155 / 2463 + + +
- + Writing Numbers694 / 751 + + +
- + Letter Pair Move Game182 / 261 + + +
- + Maximum Building I1934 / 2019 + + +
- + Sorting Methods723 / 775 + + +
- + Cyclic Array1079 / 1231 + + +
- + List of Sums437 / 570 + + +
Additional Problems II
+-
+
- + Bouncing Ball Steps140 / 153 + + +
- + Bouncing Ball Cycle55 / 75 + + +
- + Knight Moves Queries80 / 96 + + +
- + K Subset Sums I99 / 138 + + +
- + K Subset Sums II52 / 73 + + +
- + Increasing Array II735 / 850 + + +
- + Food Division492 / 582 + + +
- + Swap Round Sorting388 / 479 + + +
- + Binary Subsequences266 / 393 + + +
- + School Excursion1265 / 1345 + + +
- + Coin Grid786 / 925 + + +
- + Grid Coloring II83 / 105 + + +
- + Programmers and Artists447 / 630 + + +
- + Removing Digits II196 / 444 + + +
- + Coin Arrangement296 / 403 + + +
- + Replace with Difference70 / 87 + + +
- + Grid Puzzle I484 / 531 + + +
- + Grid Puzzle II443 / 487 + + +
- + Bit Substrings346 / 425 + + +
- + Reversal Sorting325 / 397 + + +
- + Book Shop II1083 / 1247 + + +
- + GCD Subsets260 / 268 + + +
- + Minimum Cost Pairs60 / 82 + + +
- + Same Sum Subsets66 / 123 + + +
- + Mex Grid Queries787 / 927 + + +
- + Maximum Building II412 / 507 + + +
- + Stick Divisions3555 / 4180 + + +
- + Stick Difference24 / 137 + + +
- + Coding Company1349 / 1782 + + +
- + Two Stacks Sorting156 / 493 + + +
