Competitive Programming


Methods to Solve (2000-present)

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

OJ: , Topic: , Quality: , Difficulty:

You can now sort these problems based on Distinct ACcepted Users (DACU) column.
Generally, problems with high DACU are the easier problems.
Note that we only update DACU column manually when we first entered the hint (thus an outdated data).

Column Point is only used in Kattis (and simulated in LeetCode) online judge.

UVa Problem Title CP4+5 Hint DACU Point
00165 Fetching from uHunt 3.2a, Pre-calculate-able requires some DP too; can be pre-calculated 0.0
00167 Fetching from uHunt 3.2a, Pre-calculate-able 8-queens chess problem 0.0
00256 Fetching from uHunt 3.2a, Pre-calculate-able brute force; math; pre-calculate-able 0.0
00347 Fetching from uHunt 3.2a, Pre-calculate-able simulate the process; pre-calculate-able 0.0
00750 Fetching from uHunt 3.2a, Pre-calculate-able classic backtracking problem; only 92 possible 8-queens positions 0.0
00861 Fetching from uHunt 3.2a, Pre-calculate-able backtracking with pruning as in 8-queens recursive backtracking solution; then pre-calculate the results 0.0
10128 Fetching from uHunt 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
10177 Fetching from uHunt 3.2a, Pre-calculate-able 2/3/4 nested loops; precalculate 0.0
10276 Fetching from uHunt 3.2a, Pre-calculate-able insert a number one by one 0.0
11085 Fetching from uHunt 3.2a, Pre-calculate-able see UVa 750; pre-calculation 0.0
00105 Fetching from uHunt 3.2b, Iterative (Two Loops), E height map; sweep left-right 0.0
01260 Fetching from uHunt 3.2b, Iterative (Two Loops), E LA 4843 - Daejeon10; check all 0.0
10041 Fetching from uHunt 3.2b, Iterative (Two Loops), E try all possible locations 0.0
10487 Fetching from uHunt 3.2b, Iterative (Two Loops), E sort and then do O(n^2) pairings; also available at Kattis - closestsums 0.0
10570 Fetching from uHunt 3.2b, Iterative (Two Loops), E brute force all possible final configurations (ascending/descending) and see which one requires the smallest number of e... 0.0
10670 Fetching from uHunt 3.2b, Iterative (Two Loops), E 2 nested loops; with sorting; also available at Kattis - reduction 0.0
10730 Fetching from uHunt 3.2b, Iterative (Two Loops), E 2 nested loops with pruning can still pass the time limit; compare this with UVa 11129; also available at Kattis - antia... 0.0
11242 Fetching from uHunt 3.2b, Iterative (Two Loops), E brute force plus sorting; also available at Kattis - tourdefrance 0.0
12205 Fetching from uHunt 3.2b, Iterative (Two Loops), E brute force; check intervals; also available at Kattis - telephones 0.0
12488 Fetching from uHunt 3.2b, Iterative (Two Loops), E 2 nested loops; simulate overtaking process 0.0
12583 Fetching from uHunt 3.2b, Iterative (Two Loops), E 2 nested loops; be careful of overcounting 0.0
13018 Fetching from uHunt 3.2b, Iterative (Two Loops), E 2 dices, small range; 2 nested loops 0.0
00592 Fetching from uHunt 3.2c, Iterative (Two Loops), H key idea: there are only 3^5*2 possible states: the status of each person and whether it is day or night 0.0
00617 Fetching from uHunt 3.2c, Iterative (Two Loops), H try all integer speeds from 30 to 60 mph 0.0
01588 Fetching from uHunt 3.2c, Iterative (Two Loops), H LA 3712 - NorthEasternEurope06; good iterative brute force problem; beware of corner cases 0.0
00154 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops 0.0
00441 Fetching from uHunt 3.2d, Three+ Nested Loops, E 6 nested loops; easy 0.0
00626 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops 0.0
00703 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops 0.0
00735 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops; then count 0.0
10102 Fetching from uHunt 3.2d, Three+ Nested Loops, E 4 nested loops will do; we do not need BFS; get max of minimum Manhattan distance from a 1 to a 3 0.0
10662 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops 0.0
10973 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops with pruning 0.0
11059 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops; input is small 0.0
12498 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops 0.0
12515 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops 0.0
12801 Fetching from uHunt 3.2d, Three+ Nested Loops, E 3 nested loops; still possible to be optimized further 0.0
12844 Fetching from uHunt 3.2d, Three+ Nested Loops, E 5 nested loops; scaled down version of UVa 10202; do observations first 0.0
00253 Fetching from uHunt 3.2e, Three+ Nested Loops, H try all; similar problem in UVa 11959 0.0
00296 Fetching from uHunt 3.2e, Three+ Nested Loops, H try all 10000 possible codes; 4 nested loops; use similar solution as Master-Mind game 0.0
00386 Fetching from uHunt 3.2e, Three+ Nested Loops, H 4 nested loops with pruning 0.0
10360 Fetching from uHunt 3.2e, Three+ Nested Loops, H also solvable using 1024^2 DP max sum 0.0
10365 Fetching from uHunt 3.2e, Three+ Nested Loops, H use 3 nested loops with pruning 0.0
10483 Fetching from uHunt 3.2e, Three+ Nested Loops, H 2 nested loops for a; b; derive c from a; b; there are 354 answers for range [0.01 .. 255.99]; similar to UVa 11236 0.0
10502 Fetching from uHunt 3.2e, Three+ Nested Loops, H 6 nested loops; rectangle 0.0
10660 Fetching from uHunt 3.2e, Three+ Nested Loops, H 7 nested loops; Manhattan distance 0.0
11108 Fetching from uHunt 3.2e, Three+ Nested Loops, H try all 2^5 = 32 values with pruning; also available at Kattis - tautology 0.0
11236 Fetching from uHunt 3.2e, Three+ Nested Loops, H 3 nested loops for a; b; c; derive d from a; b; c; check if you have 949 lines of output 0.0
11342 Fetching from uHunt 3.2e, Three+ Nested Loops, H pre-calculate squared values from 0^2 to 224^2; use 3 nested loops to generate the answers; use map to avoid duplicates 0.0
11548 Fetching from uHunt 3.2e, Three+ Nested Loops, H 4 nested loops; string; pruning 0.0
11565 Fetching from uHunt 3.2e, Three+ Nested Loops, H 3 nested loops with pruning 0.0
11804 Fetching from uHunt 3.2e, Three+ Nested Loops, H 5 nested loops 0.0
11959 Fetching from uHunt 3.2e, Three+ Nested Loops, H try all possible dice positions; compare with the 2nd one 0.0
11975 Fetching from uHunt 3.2e, Three+ Nested Loops, H 3 nested loops; simulate the game as asked 0.0
12337 Fetching from uHunt 3.2e, Three+ Nested Loops, H try all possible row x col size and test if it is beautiful 0.0
00140 Fetching from uHunt 3.2f, Iterative (Permutation) max n is just 8; use next_permutation; the algorithm inside next_permutation is iterative 0.0
00146 Fetching from uHunt 3.2f, Iterative (Permutation) use next_permutation 0.0
00234 Fetching from uHunt 3.2f, Iterative (Permutation) LA 5173 - WorldFinals Phoenix94; use next_permutation; simulation 0.0
00418 Fetching from uHunt 3.2f, Iterative (Permutation) use next_permutation to permute the 4 molecule locations and then use 12^6 six-nested-loops to check the area of the sup... 0.0
01064 Fetching from uHunt 3.2f, Iterative (Permutation) LA 3808 - WorldFinals Tokyo07; permutation of up to 5 messages; simulation; mind the word 'consecutive' 0.0
01209 Fetching from uHunt 3.2f, Iterative (Permutation) LA 3173 - Manila06; STL next and prev_permutation 0.0
10997 Fetching from uHunt 3.2f, Iterative (Permutation) not an easy problem; require analysis to realize that the search space is small; also available at Kattis - medals 0.0
11412 Fetching from uHunt 3.2f, Iterative (Permutation) next_permutation; find one possibility from 6! 0.0
11742 Fetching from uHunt 3.2f, Iterative (Permutation) try all permutations 0.0
12249 Fetching from uHunt 3.2f, Iterative (Permutation) LA 4994 - KualaLumpur10; try all permutations; a bit of string matching 0.0
00435 Fetching from uHunt 3.2g, Iterative (Combination) only 2^20 possible coalition combinations 0.0
00517 Fetching from uHunt 3.2g, Iterative (Combination) convert (a; b) to (0; 1) first so that we only work with integers; there can only be 2^16 possibilities although s can b... 0.0
00639 Fetching from uHunt 3.2g, Iterative (Combination) generate 2^(4x4) = 2^16 combinations and prune 0.0
01047 Fetching from uHunt 3.2g, Iterative (Combination) LA 3278 - WorldFinals Shanghai05; try all 2^n subsets of towers to be taken; use inclusion-exclusion principle 0.0
11205 Fetching from uHunt 3.2g, Iterative (Combination) try all 2^15 bitmask 0.0
11659 Fetching from uHunt 3.2g, Iterative (Combination) try all 2^20 bitmask and check 0.0
12346 Fetching from uHunt 3.2g, Iterative (Combination) LA 5723 - Phuket11; try all 2^n combinations; pick the best one 0.0
12348 Fetching from uHunt 3.2g, Iterative (Combination) LA 5725 - Phuket11; try all 2^n combinations 0.0
12406 Fetching from uHunt 3.2g, Iterative (Combination) try all 2^p possible bitmasks; change '0's to '2's 0.0
12694 Fetching from uHunt 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
13103 Fetching from uHunt 3.2g, Iterative (Combination) try all 2^k combinations; swapping a 0-bit with another 0-bit or 1-bit with another 1-bit has no effect 0.0
00102 Fetching from uHunt 3.2h, Try All Answers try all 6 combinations of possible answers 0.0
00188 Fetching from uHunt 3.2h, Try All Answers 3 nested loops; keep trying until an answer is found 0.0
00471 Fetching from uHunt 3.2h, Try All Answers somewhat similar to UVa 00725 0.0
00725 Fetching from uHunt 3.2h, Try All Answers try all possible answers 0.0
10908 Fetching from uHunt 3.2h, Try All Answers 4 nested loops; try all possible odd square lengths 0.0
00100 Fetching from uHunt 3.2i, Math Simulation, E simply do as asked; the only trap is that j can be < i 0.0
00371 Fetching from uHunt 3.2i, Math Simulation, E similar to UVa 100 0.0
00382 Fetching from uHunt 3.2i, Math Simulation, E do trial division 0.0
00654 Fetching from uHunt 3.2i, Math Simulation, E just use brute force 0.0
00906 Fetching from uHunt 3.2i, Math Simulation, E compute c from d = 1 until a/b < c/d 0.0
01225 Fetching from uHunt 3.2i, Math Simulation, E LA 3996 - Danang07; N is small 0.0
01583 Fetching from uHunt 3.2i, Math Simulation, E N is small; prepare an array of size 100044; that is the largest possible digit sum for this problem 0.0
10346 Fetching from uHunt 3.2i, Math Simulation, E interesting simulation problem 0.0
10370 Fetching from uHunt 3.2i, Math Simulation, E compute average; see how many are above it; also available at Kattis - aboveaverage 0.0
10783 Fetching from uHunt 3.2i, Math Simulation, E input range is very small; just brute force it 0.0
10879 Fetching from uHunt 3.2i, Math Simulation, E just use brute force 0.0
11001 Fetching from uHunt 3.2i, Math Simulation, E brute force math; maximize function 0.0
11150 Fetching from uHunt 3.2i, Math Simulation, E similar to UVa 10346; be careful with boundary cases! 0.0
11247 Fetching from uHunt 3.2i, Math Simulation, E brute force around the answer to be safe 0.0
11313 Fetching from uHunt 3.2i, Math Simulation, E similar to UVa 10346 0.0
11689 Fetching from uHunt 3.2i, Math Simulation, E similar to UVa 10346; also available at Kattis - sodasurpler 0.0
11877 Fetching from uHunt 3.2i, Math Simulation, E similar to UVa 10346 0.0
11934 Fetching from uHunt 3.2i, Math Simulation, E just do plain brute-force 0.0
12527 Fetching from uHunt 3.2i, Math Simulation, E try all; check repeated digits 0.0
12938 Fetching from uHunt 3.2i, Math Simulation, E complete search; 4 digits; square numbers 0.0
13059 Fetching from uHunt 3.2i, Math Simulation, E just simulate the counting; it will only runs in logarithmic steps; use long long 0.0
13131 Fetching from uHunt 3.2i, Math Simulation, E brute force version of modified sumDiv(N) function 0.0
00493 Fetching from uHunt 3.2k, Math Simulation, H simulate the spiral process 0.0
00550 Fetching from uHunt 3.2k, Math Simulation, H rotamult property; try one by one starting from 1 digit 0.0
00616 Fetching from uHunt 3.2k, Math Simulation, H brute force up to sqrt(n); get pattern 0.0
00697 Fetching from uHunt 3.2k, Math Simulation, H output formatting and basic Physics 0.0
00846 Fetching from uHunt 3.2k, Math Simulation, H uses the sum of arithmetic progression formula 0.0
10025 Fetching from uHunt 3.2k, Math Simulation, H simplify the formula first; iterative 0.0
10035 Fetching from uHunt 3.2k, Math Simulation, H count the number of carry operations 0.0
11130 Fetching from uHunt 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
11254 Fetching from uHunt 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
11490 Fetching from uHunt 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
11968 Fetching from uHunt 3.2k, Math Simulation, H average; fabs; if ties; choose the smaller one! 0.0
12169 Fetching from uHunt 3.2k, Math Simulation, H brute force constants a and b between [0..10 000] and do O(n) checks; break early as soon as a solution is found; also... 0.0
12290 Fetching from uHunt 3.2k, Math Simulation, H no -1 in the answer 0.0
12665 Fetching from uHunt 3.2k, Math Simulation, H be careful with boundary conditions 0.0
12792 Fetching from uHunt 3.2k, Math Simulation, H simulate the process to get the answer 0.0
12895 Fetching from uHunt 3.2k, Math Simulation, H verbatim brute force check 0.0
00130 Fetching from uHunt 3.2l, Josephus Problem the original Josephus problem 0.0
00133 Fetching from uHunt 3.2l, Josephus Problem brute force; similar to UVa 130 0.0
00151 Fetching from uHunt 3.2l, Josephus Problem the original Josephus problem 0.0
00305 Fetching from uHunt 3.2l, Josephus Problem the answer can be precalculated 0.0
00402 Fetching from uHunt 3.2l, Josephus Problem modified Josephus; simulation 0.0
00440 Fetching from uHunt 3.2l, Josephus Problem brute force; similar to UVa 151 0.0
01176 Fetching from uHunt 3.2l, Josephus Problem LA 2346 - Dhaka01; special case when k = 2; use Josephus recurrence; simulation 0.0
10015 Fetching from uHunt 3.2l, Josephus Problem modified Josephus; dynamic k; variant of UVa 305 0.0
10771 Fetching from uHunt 3.2l, Josephus Problem brute force; input size is small 0.0
10774 Fetching from uHunt 3.2l, Josephus Problem repeated special case of Josephus when k = 2 0.0
11351 Fetching from uHunt 3.2l, Josephus Problem use general case Josephus recurrence 0.0
00380 Fetching from uHunt 3.2m, Backtracking, Easier simple backtracking; but we have to work with strings 0.0
00487 Fetching from uHunt 3.2m, Backtracking, Easier use map to store the generated words 0.0
00524 Fetching from uHunt 3.2m, Backtracking, Easier involving prime number 0.0
00529 Fetching from uHunt 3.2m, Backtracking, Easier use backtracking to get the solution 0.0
00571 Fetching from uHunt 3.2m, Backtracking, Easier solution can be suboptimal; add flag to avoid cycling 0.0
00598 Fetching from uHunt 3.2m, Backtracking, Easier print all solutions with backtracking 0.0
00628 Fetching from uHunt 3.2m, Backtracking, Easier backtracking; follow the rules in description 0.0
00677 Fetching from uHunt 3.2m, Backtracking, Easier print all solutions with backtracking 0.0
00729 Fetching from uHunt 3.2m, Backtracking, Easier generate all possible bit strings 0.0
00868 Fetching from uHunt 3.2m, Backtracking, Easier backtracking from row 1 to N; 4 choices per step; some constraints 0.0
10344 Fetching from uHunt 3.2m, Backtracking, Easier 5 operands + 3 operators 0.0
10452 Fetching from uHunt 3.2m, Backtracking, Easier at each pos; Indy can go forth/left/right; try all 0.0
10503 Fetching from uHunt 3.2m, Backtracking, Easier max 13 spaces only 0.0
10576 Fetching from uHunt 3.2m, Backtracking, Easier generate all; prune; take max 0.0
10624 Fetching from uHunt 3.2m, Backtracking, Easier backtracking with divisibility check 0.0
10776 Fetching from uHunt 3.2m, Backtracking, Easier recursive backtracking 0.0
10950 Fetching from uHunt 3.2m, Backtracking, Easier sort the input; run backtracking; the output should be sorted; only display the first 100 sorted output 0.0
11201 Fetching from uHunt 3.2m, Backtracking, Easier backtracking involving strings 0.0
11961 Fetching from uHunt 3.2m, Backtracking, Easier up to 4^10 possible DNA strings; mutation power is at most K ≤ 5 so the search space is much smaller; sort the output... 0.0
12840 Fetching from uHunt 3.2m, Backtracking, Easier simple backtracking 0.0
00129 Fetching from uHunt 3.2n, Backtracking, Harder backtracking; string processing check; a bit of output formatting 0.0
00208 Fetching from uHunt 3.2n, Backtracking, Harder LA 5147 - WorldFinals SanAntonio91; backtracking with some pruning 0.0
00222 Fetching from uHunt 3.2n, Backtracking, Harder LA 5161 - WorldFinals Indianapolis93; cannot use DP 'tank' is floating-point; use backtracking 0.0
00301 Fetching from uHunt 3.2n, Backtracking, Harder 2^22 with pruning is possible 0.0
00307 Fetching from uHunt 3.2n, Backtracking, Harder sort the sticks in descending length; group similar lengths; brute force the number of sticks; backtracking to check fea... 0.0
00331 Fetching from uHunt 3.2n, Backtracking, Harder n <= 5... 0.0
00416 Fetching from uHunt 3.2n, Backtracking, Harder backtrack; try all 0.0
00433 Fetching from uHunt 3.2n, Backtracking, Harder similar to UVa 416 0.0
00565 Fetching from uHunt 3.2n, Backtracking, Harder backtracking with lots of pruning 0.0
01262 Fetching from uHunt 3.2n, Backtracking, Harder LA 4845 - Daejeon10; sort grid columns; process common passwords in lexicographic order; skip two similar passwords 0.0
10001 Fetching from uHunt 3.2n, Backtracking, Harder the upperbound of 2^32 is scary but with efficient pruning; we can pass the time limit as the test case is not extreme 0.0
10063 Fetching from uHunt 3.2n, Backtracking, Harder do as asked 0.0
10094 Fetching from uHunt 3.2n, Backtracking, Harder this problem is like the n-queens chess problem; but must find/use the pattern! 0.0
10460 Fetching from uHunt 3.2n, Backtracking, Harder similar nature with UVa 10063 0.0
10475 Fetching from uHunt 3.2n, Backtracking, Harder generate and prune; try all 0.0
10582 Fetching from uHunt 3.2n, Backtracking, Harder simplify complex input first; then backtrack 0.0
11052 Fetching from uHunt 3.2n, Backtracking, Harder the worst case time complexity of 2^1000 looks scary but the search space is apparently not that big 0.0
11753 Fetching from uHunt 3.2n, Backtracking, Harder the state is probably too big if we use DP; but we can pass the time limit with just backtracking 0.0
00679 Fetching from uHunt 3.3a, Binary Search binary search; bit manipulation solutions exist 0.0
00957 Fetching from uHunt 3.3a, Binary Search complete search binary search: upper_bound 0.0
10057 Fetching from uHunt 3.3a, Binary Search involves the median; use STL sort; upper_bound; lower_bound and some checks 0.0
10077 Fetching from uHunt 3.3a, Binary Search binary search 0.0
10474 Fetching from uHunt 3.3a, Binary Search simple: use sort and then lower_bound 0.0
10567 Fetching from uHunt 3.3a, Binary Search store inc indices of each char of S in 52 vectors; binary search for the position of the char in the correct vector 0.0
10611 Fetching from uHunt 3.3a, Binary Search binary search 0.0
10706 Fetching from uHunt 3.3a, Binary Search binary search some mathematical insights 0.0
10742 Fetching from uHunt 3.3a, Binary Search use sieve; binary search 0.0
11057 Fetching from uHunt 3.3a, Binary Search sort; target pair problem 0.0
11621 Fetching from uHunt 3.3a, Binary Search generate numbers with factor 2 and/or 3; sort; upper_bound 0.0
11876 Fetching from uHunt 3.3a, Binary Search [lower|upper]_bound on sorted sequence N 0.0
12192 Fetching from uHunt 3.3a, Binary Search input array is specially sorted; lower_bound 0.0
12965 Fetching from uHunt 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
01753 Fetching from uHunt 3.3b, Bisection and BSTA, E LA 8043 - WorldFinals RapidCity17; BSTA + Physics; also available at Kattis - speed 0.0
10341 Fetching from uHunt 3.3b, Bisection and BSTA, E bisection method; for alternative solutions; see http://www.algorithmist.com/index.php/UVa_10341 0.0
11413 Fetching from uHunt 3.3b, Bisection and BSTA, E BSTA + simulation 0.0
11627 Fetching from uHunt 3.3b, Bisection and BSTA, E binary search the answer + Physics simulation; also available at Kattis - slalom2 0.0
11881 Fetching from uHunt 3.3b, Bisection and BSTA, E bisection method 0.0
11935 Fetching from uHunt 3.3b, Bisection and BSTA, E BSTA + simulation 0.0
12032 Fetching from uHunt 3.3b, Bisection and BSTA, E BSTA + simulation 0.0
12190 Fetching from uHunt 3.3b, Bisection and BSTA, E BSTA + algebra 0.0
12791 Fetching from uHunt 3.3b, Bisection and BSTA, E BSTA + math formula to check if the leader pilot can overtake the backmarker pilot at that lap 0.0
13142 Fetching from uHunt 3.3b, Bisection and BSTA, E BSTA + Physics simulation 0.0
00183 Fetching from uHunt 3.3c, Ternary Search & Others simple exercise of DnC 0.0
00608 Fetching from uHunt 3.3c, Ternary Search & Others classical problem; after each weighing; we can halve the search space 0.0
01738 Fetching from uHunt 3.3c, Ternary Search & Others LA 7578 - WorldFinals Phuket16; BST insertion then tree equality check; also available at Kattis - ceiling 0.0
10385 Fetching from uHunt 3.3c, Ternary Search & Others the function is unimodal; ternary search 0.0
11147 Fetching from uHunt 3.3c, Ternary Search & Others implement the given recursive DnC 0.0
11701 Fetching from uHunt 3.3c, Ternary Search & Others a kind of ternary search 0.0
12893 Fetching from uHunt 3.3c, Ternary Search & Others convert the given code into recursive DnC 0.0
00410 Fetching from uHunt 3.4a, Greedy (Classical) load balancing 0.0
01193 Fetching from uHunt 3.4a, Greedy (Classical) LA 2519 - Beijing02; interval covering 0.0
10020 Fetching from uHunt 3.4a, Greedy (Classical) interval covering 0.0
10249 Fetching from uHunt 3.4a, Greedy (Classical) greedy; sorting 0.0
10382 Fetching from uHunt 3.4a, Greedy (Classical) interval covering; also available at Kattis - grass 0.0
11264 Fetching from uHunt 3.4a, Greedy (Classical) coin change variant 0.0
11292 Fetching from uHunt 3.4a, Greedy (Classical) sort; greedy matching; also available at Kattis - loowater 0.0
11389 Fetching from uHunt 3.4a, Greedy (Classical) load balancing 0.0
12210 Fetching from uHunt 3.4a, Greedy (Classical) greedy; sorting 0.0
12321 Fetching from uHunt 3.4a, Greedy (Classical) interval covering 0.0
12405 Fetching from uHunt 3.4a, Greedy (Classical) simpler interval covering problem 0.0
10763 Fetching from uHunt 3.4b, Involving Sorting, E greedy; sorting 0.0
10785 Fetching from uHunt 3.4b, Involving Sorting, E greedy; sorting 0.0
11269 Fetching from uHunt 3.4b, Involving Sorting, E greedy; sorting 0.0
11369 Fetching from uHunt 3.4b, Involving Sorting, E greedy; sorting 0.0
11729 Fetching from uHunt 3.4b, Involving Sorting, E greedy; sorting 0.0
11900 Fetching from uHunt 3.4b, Involving Sorting, E greedy; sorting 0.0
12485 Fetching from uHunt 3.4b, Involving Sorting, E greedy; sorting 0.0
13031 Fetching from uHunt 3.4b, Involving Sorting, E greedy; sorting 0.0
13109 Fetching from uHunt 3.4b, Involving Sorting, E greedy; sorting 0.0
10026 Fetching from uHunt 3.4d, Involving Sorting, H greedy; sorting 0.0
10037 Fetching from uHunt 3.4d, Involving Sorting, H greedy; sorting; also see Kattis - bridge 0.0
11100 Fetching from uHunt 3.4d, Involving Sorting, H greedy; sorting; also available at Kattis - trip2007 0.0
11103 Fetching from uHunt 3.4d, Involving Sorting, H greedy; sorting; also available at Kattis - wffnproof 0.0
12673 Fetching from uHunt 3.4d, Involving Sorting, H LA 6530 - LatinAmerica13; greedy; sorting 0.0
12834 Fetching from uHunt 3.4d, Involving Sorting, H greedy; sorting 0.0
13054 Fetching from uHunt 3.4d, Involving Sorting, H greedy; sorting 0.0
01153 Fetching from uHunt 3.4e, Involving PQ greedy; priority queue 0.0
10954 Fetching from uHunt 3.4e, Involving PQ greedy; priority queue 0.0
12390 Fetching from uHunt 3.4e, Involving PQ greedy; priority queue 0.0
13177 Fetching from uHunt 3.4e, Involving PQ greedy; priority queue 0.0
10152 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
10340 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
10440 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
10602 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
10656 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
10672 Fetching from uHunt 3.4f, Non Classical, Easier greedy; also available at Kattis - marblestree 0.0
10700 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
10714 Fetching from uHunt 3.4f, Non Classical, Easier greedy; also available at Kattis - ants 0.0
11054 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
11520 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
11532 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
12482 Fetching from uHunt 3.4f, Non Classical, Easier greedy 0.0
00311 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
00668 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
10718 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
10821 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
10982 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
11157 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
11230 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
11240 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
11330 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
11335 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
11491 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
11567 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
11583 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
11890 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
12124 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
12516 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
13082 Fetching from uHunt 3.4g, Non Classical, Harder greedy 0.0
00108 Fetching from uHunt 3.5a, Max 1D/2D Range Sum max 2D range sum 0.0
00507 Fetching from uHunt 3.5a, Max 1D/2D Range Sum standard problem 0.0
00787 Fetching from uHunt 3.5a, Max 1D/2D Range Sum max 1D range product; be careful with 0; use Java BigInteger 0.0
00836 Fetching from uHunt 3.5a, Max 1D/2D Range Sum convert '0' to -INF 0.0
00983 Fetching from uHunt 3.5a, Max 1D/2D Range Sum max 2D range sum; get submatrix 0.0
01105 Fetching from uHunt 3.5a, Max 1D/2D Range Sum LA 5132 - WorldFinals Orlando11; more advanced 2D Range Sum Queries 0.0
10074 Fetching from uHunt 3.5a, Max 1D/2D Range Sum standard problem 0.0
10667 Fetching from uHunt 3.5a, Max 1D/2D Range Sum standard problem 0.0
10684 Fetching from uHunt 3.5a, Max 1D/2D Range Sum standard; Kadane's algorithm 0.0
10755 Fetching from uHunt 3.5a, Max 1D/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
10827 Fetching from uHunt 3.5a, Max 1D/2D Range Sum copy n*n matrix into n*2n matrix; then this problem becomes a standard max 2D range sum problem again 0.0
11951 Fetching from uHunt 3.5a, Max 1D/2D Range Sum use long long; max 2D range sum; prune the search space whenever possible 0.0
12640 Fetching from uHunt 3.5a, Max 1D/2D Range Sum standard; Kadane's algorithm 0.0
13095 Fetching from uHunt 3.5a, Max 1D/2D Range Sum create 10 range sum queries; you don't need Fenwick Tree actually 0.0
00111 Fetching from uHunt 3.5b, LIS be careful of the ranking system 0.0
00231 Fetching from uHunt 3.5b, LIS straightforward 0.0
00437 Fetching from uHunt 3.5b, LIS can be modeled as LIS 0.0
00481 Fetching from uHunt 3.5b, LIS O(n log k) LIS+solution 0.0
00497 Fetching from uHunt 3.5b, LIS solution must be printed 0.0
01196 Fetching from uHunt 3.5b, LIS LA 2815 - Kaohsiung03; sort all the blocks in increasing L[i]; then we get the classical LIS problem 0.0
10131 Fetching from uHunt 3.5b, LIS sort elephants based on decreasing IQ; LIS on increasing weight 0.0
10154 Fetching from uHunt 3.5b, LIS LIS variant 0.0
10534 Fetching from uHunt 3.5b, LIS must use O(n log k) LIS twice 0.0
11368 Fetching from uHunt 3.5b, LIS sort in one dimension; Dilworth's theorem; LIS in the other; also available at Kattis - nesteddolls 0.0
11456 Fetching from uHunt 3.5b, LIS max(LIS(i)+LDS(i)-1), ∀i ∈ [0...n-1]; also available at Kattis - trainsorting 0.0
11790 Fetching from uHunt 3.5b, LIS combination of LIS LDS; weighted 0.0
00431 Fetching from uHunt 3.5c, 0-1 KNAPSACK classic 0-1 Knapsack Problem; output any optimal solution as there is a special checker for this problem 0.0
00562 Fetching from uHunt 3.5c, 0-1 KNAPSACK use a one dimensional table 0.0
00990 Fetching from uHunt 3.5c, 0-1 KNAPSACK print the solution 0.0
01213 Fetching from uHunt 3.5c, 0-1 KNAPSACK LA 3619 - Yokohama06; extension of 0-1 KNAPSACK; s: (id, remN, remK) instead of s: (id, remN) 0.0
10130 Fetching from uHunt 3.5c, 0-1 KNAPSACK basic 0-1 Knapsack problem 0.0
10261 Fetching from uHunt 3.5c, 0-1 KNAPSACK s: (current_car; left; right) 0.0
10616 Fetching from uHunt 3.5c, 0-1 KNAPSACK input can be -ve; use long long 0.0
10664 Fetching from uHunt 3.5c, 0-1 KNAPSACK Subset Sum 0.0
10690 Fetching from uHunt 3.5c, 0-1 KNAPSACK DP Subset Sum with negative offset technique; with addition of simple math 0.0
10819 Fetching from uHunt 3.5c, 0-1 KNAPSACK 0-1 knapsack with 'credit card' twist 0.0
11003 Fetching from uHunt 3.5c, 0-1 KNAPSACK try all max weight from 0 to max(weight[i] capacity[i]); forall i in [0..n-1]; if a max weight is known; how many boxes ... 0.0
11341 Fetching from uHunt 3.5c, 0-1 KNAPSACK s: (id; h_learned; h_left); t: learn module 'id' by 1 hour or skip it 0.0
11566 Fetching from uHunt 3.5c, 0-1 KNAPSACK KNAPSACK variant: double each dim sum; add one parameter to see if we have bought too many dishes 0.0
11658 Fetching from uHunt 3.5c, 0-1 KNAPSACK s: (id; share); t: form/ignore coalition with id 0.0
11832 Fetching from uHunt 3.5c, 0-1 KNAPSACK interesting DP; s: (id; val); use offset to handle negative numbers; t: plus or minus; print solution 0.0
12621 Fetching from uHunt 3.5c, 0-1 KNAPSACK DP Subset Sum; simplify the multiple of 10 0.0
00147 Fetching from uHunt 3.5d, COIN-CHANGE similar to UVa 357 and 674 0.0
00166 Fetching from uHunt 3.5d, COIN-CHANGE two coin change variants in one problem 0.0
00242 Fetching from uHunt 3.5d, COIN-CHANGE LA 5181 - WorldFinals Nashville95; Complete Search + DP Coin-Change 0.0
00357 Fetching from uHunt 3.5d, COIN-CHANGE similar to UVa 147 and 674 0.0
00674 Fetching from uHunt 3.5d, COIN-CHANGE basic coin change problem 0.0
10313 Fetching from uHunt 3.5d, COIN-CHANGE modified coin change and DP 1D range sum 0.0
10448 Fetching from uHunt 3.5d, COIN-CHANGE after dealing with traversal on tree; you can reduce the original problem into coin change; not trivial 0.0
11137 Fetching from uHunt 3.5d, COIN-CHANGE use long long 0.0
11259 Fetching from uHunt 3.5d, COIN-CHANGE part of the problem is DP COIN-CHANGE with restricted number of coins per type; inclusion-exclusion 0.0
11517 Fetching from uHunt 3.5d, COIN-CHANGE a variation to the coin change problem; also available at Kattis - exactchange2 0.0
00216 Fetching from uHunt 3.5e, TSP LA 5155 - WorldFinals KansasCity92; DP TSP problem; but still solvable with backtracking 0.0
01281 Fetching from uHunt 3.5e, TSP LA 6028 - WorldFinals Warsaw12; DP TSP variant; also available at Kattis - bustour 0.0
10496 Fetching from uHunt 3.5e, TSP DP or recursive backtracking with sufficient pruning; also available at Kattis - beepers 0.0
11795 Fetching from uHunt 3.5e, TSP DP TSP variant; counting paths on DAG; DP+bitmask; let Mega Buster owned by a dummy 'Robot 0' 0.0
12841 Fetching from uHunt 3.5e, TSP simply find and print the lexicographically smallest Hamiltonian path; use DP-TSP technique 0.0
00116 Fetching from uHunt 3.5f, DP level 1 similar to UVa 10337 0.0
00196 Fetching from uHunt 3.5f, DP level 1 3.5g 0.0
00215 Fetching from uHunt 3.5f, DP level 1 3.5g 0.0
01261 Fetching from uHunt 3.5f, DP level 1 LA 4844 - Daejeon10; a simple backtracking problem; but we use a setÿto prevent the same state (a substring) from being... 0.0
10003 Fetching from uHunt 3.5f, DP level 1 s: (l; r) 0.0
10036 Fetching from uHunt 3.5f, DP level 1 must use offset technique as value can be negative 0.0
10086 Fetching from uHunt 3.5f, DP level 1 3.5g 0.0
10337 Fetching from uHunt 3.5f, DP level 1 DP; shortest paths on DAG 0.0
10446 Fetching from uHunt 3.5f, DP level 1 edit the given recursive function a bit; add memoization 0.0
10520 Fetching from uHunt 3.5f, DP level 1 just write the given formula as a top-down DP with memoization 0.0
10721 Fetching from uHunt 3.5f, DP level 1 s: (n; k); t: try all from 1 to m 0.0
10910 Fetching from uHunt 3.5f, DP level 1 two dimensional DP table 0.0
10912 Fetching from uHunt 3.5f, DP level 1 s: (len; last; sum); t: try next char 0.0
10943 Fetching from uHunt 3.5f, DP level 1 s: (n; k); t: try all the possible splitting points; alternative solution is to use the closed form mathematical formula... 0.0
10980 Fetching from uHunt 3.5f, DP level 1 simple DP 0.0
11026 Fetching from uHunt 3.5f, DP level 1 DP; similar idea with binomial theorem 0.0
11407 Fetching from uHunt 3.5f, DP level 1 can be memoized 0.0
11420 Fetching from uHunt 3.5f, DP level 1 s: (prev; id; numlck); lock/unlock this chest 0.0
11450 Fetching from uHunt 3.5f, DP level 1 standard DP 0.0
11703 Fetching from uHunt 3.5f, DP level 1 can be memoized 0.0
12654 Fetching from uHunt 3.5f, DP level 1 s: (hole); t: use patch T1 or patch T2 0.0
12951 Fetching from uHunt 3.5f, DP level 1 s: (day, has_stock); t: ignore, buy (if does not have stock), or sell (if has stock) 0.0
13141 Fetching from uHunt 3.5f, DP level 1 s: (level, branch_previously); t: not branching if branch_previously or branching (one side) otherwise 0.0
00662 Fetching from uHunt 3.5g, DP level 2 s: (L; R; k); that denotes the minimum distance sum to cover restaurants at index [L..R] with k depots left 0.0
10039 Fetching from uHunt 3.5g, DP level 2 create the graph first; then apply DP; s: (city; curtime); t: try all feasible trains 0.0
10069 Fetching from uHunt 3.5g, DP level 2 use Java BigInteger 0.0
10081 Fetching from uHunt 3.5g, DP level 2 s: (i, j); #tight words of length i that end in digit j divided by #words: (k+1)^n; also available at Kattis - tight 0.0
10120 Fetching from uHunt 3.5g, DP level 2 DP; special case for N >= 49 0.0
10164 Fetching from uHunt 3.5g, DP level 2 a bit number theory (modulo); backtracking; do memoization on DP s: (sum; taken) 0.0
10239 Fetching from uHunt 3.5g, DP level 2 convert double to long long first; medium DP; either put this book in the current shelf (if possible) or put it in a new... 0.0
10400 Fetching from uHunt 3.5g, DP level 2 backtracking with clever pruning is sufficient 0.0
10465 Fetching from uHunt 3.5g, DP level 2 one dimensional DP table 0.0
10651 Fetching from uHunt 3.5g, DP level 2 small problem size; doable with backtracking 0.0
11485 Fetching from uHunt 3.5g, DP level 2 the problem description looks scary but the solution is not that complex 0.0
11514 Fetching from uHunt 3.5g, DP level 2 modified 0-1 Knapsack; Batman can use or skip a certain super power; check if the best configuration uses ≤ E calorie... 0.0
11908 Fetching from uHunt 3.5g, DP level 2 sort the advertisements based on starting level; ending level; and cost; DP 1 dimension 0.0
12324 Fetching from uHunt 3.5g, DP level 2 spheres > n are useless 0.0
12862 Fetching from uHunt 3.5g, DP level 2 1D DP to compute the path cost from every vertex that goes up to the mountain top; compute answer 0.0
12955 Fetching from uHunt 3.5g, 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

Buy Now!


Partner Links