Cashier Scanning Algorithm Problem
Let the $i$th item have profit $p_i$, and assume there are $n$ items passing by.
We can construct a graph where the nodes are pairs $(k, b)$ where $k$ is the number of timesteps, and $b$ is the number of items in our bagging area. We have $0 \leq k \leq x$ and $0 \leq b \leq c$.
Then, avoiding invalid nodes and/or nonsensical self-edges,

Add edges from $(i-1, b)$ to $(i, b + 1)$ with weight $-p_i$. These represent scanning an item.

Add edges from $(i, b)$ to $(i + 1, b)$ with weight $0$ for all $i$. These represent skipping an item.

Add edges from $(i, b)$ to $(i + b, 0)$. These represent bagging all scanned items.


Now we have a directed weighted acyclic graph, in which we can find the longest path in linear time. And the longest path between $(0, 0)$ and $(x, 0)$ precisely gives us the maximum profit (and following the path also gives us the steps used).
There are $O(cn)$ edges, and thus that is our complexity.