Jikka-5.0.11.1: A transpiler from Python to C++ for competitive programming
Copyright(c) Kimiyuki Onaka 2021
LicenseApache License 2.0
Maintainerkimiyuki95@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Jikka.Core.Convert.SegmentTree

Description

\[ \newcommand\int{\mathbf{int}} \newcommand\bool{\mathbf{bool}} \newcommand\list{\mathbf{list}} \]

Synopsis

Documentation

internal rules

reduceCumulativeSum :: (MonadAlpha m, MonadError Error m) => RewriteRule m Source #

reduceCumulativeSum converts combinations of cumulative sums and array assignments to segment trees.

reduceMin :: MonadAlpha m => RewriteRule m Source #

reduceFromMin uses segment trees from accumulation of min/max which are not reducible to cumulative sums.

TODO: implement this