  In the decremental single-source shortest paths problem, the goal is to
maintain distances from a fixed source $s$ to every vertex $v$ in an $m$-edge
graph undergoing edge deletions. In this paper, we conclude a long line of
research on this problem by showing a near-optimal deterministic data structure
that maintains $(1+\epsilon)$-approximate distance estimates and runs in
$m^{1+o(1)}$ total update time.
  Our result, in particular, removes the oblivious adversary assumption
required by the previous breakthrough result by Henzinger et al. [FOCS'14],
which leads to our second result: the first almost-linear time algorithm for
$(1-\epsilon)$-approximate min-cost flow in undirected graphs where capacities
and costs can be taken over edges and vertices. Previously, algorithms for max
flow with vertex capacities, or min-cost flow with any capacities required
super-linear time. Our result essentially completes the picture for approximate
flow in undirected graphs.
  The key technique of the first result is a novel framework that allows us to
treat low-diameter graphs like expanders. This allows us to harness expander
properties while bypassing shortcomings of expander decomposition, which almost
all previous expander-based algorithms needed to deal with. For the second
result, we break the notorious flow-decomposition barrier from the
multiplicative-weight-update framework using randomization.
