Racing Gems
From charlesreid1
Problem Description
This problem is an ICPC programming competition problem.
In this problem, we have a race track of width x = 0 to x = w, height y = 0 to y = h. We have a character that begins at the x-axis (y=0) and moves toward the finish line (y=h) with a steady velocity v.
You control the character's horizontal velocity, -v/r to +v/r, and your goal is to obtain as many gems as possible.
The location of gems are given by (x,y) integer pairs on the grid. Determine the maximum number of gems that can be obtained by the character.
Git repo has solution explanation: https://git.charlesreid1.com/cs/java/src/master/dynamic-programming/racing-gems
Flags
Combinatorics
Combinatorial Structures - Order Does Not Matter Ordinary generating functions
Labelled Structures - Order Matters Enumerating Permutations: String Permutations Generating Permutations: Cool · Algorithm M (add-one) · Algorithm G (Gray binary code)
Combinatorics Problems Longest Increasing Subsequence · Maximum Value Contiguous Subsequence · Racing Gems Cards (poker hands with a deck of 52 playing cards)
|
Algorithms Part of Computer Science Notes
Series on Algorithms
Algorithms/Sort · Algorithmic Analysis of Sort Functions · Divide and Conquer · Divide and Conquer/Master Theorem Three solid O(n log n) search algorithms: Merge Sort · Heap Sort · Quick Sort Algorithm Analysis/Merge Sort · Algorithm Analysis/Randomized Quick Sort
Algorithms/Search · Binary Search · Binary Search Modifications
Algorithms/Combinatorics · Algorithms/Combinatorics and Heuristics · Algorithms/Optimization · Divide and Conquer
Algorithms/Strings · Algorithm Analysis/Substring Pattern Matching
Algorithm complexity · Theta vs Big O Amortization · Amortization/Aggregate Method · Amortization/Accounting Method Algorithm Analysis/Matrix Multiplication
Estimation Estimation · Estimation/BitsAndBytes
Algorithm Practice and Writeups Project Euler · Five Letter Words · Letter Coverage
|