summaryrefslogtreecommitdiff
path: root/datastructures/test/lazyPropagation.awk
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 01:24:14 +0100
committerGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 01:24:14 +0100
commit98567ec798aa8ca2cfbcb85c774dd470f30e30d4 (patch)
tree5113d5cc24d1ad5f93810b6442ce584a36950dc8 /datastructures/test/lazyPropagation.awk
parentad3856a6b766087df0036de0b556f4700a6498c9 (diff)
parent8d11c6c8213f46f0fa19826917c255edd5d43cb1 (diff)
mzuenni tests
Diffstat (limited to 'datastructures/test/lazyPropagation.awk')
-rw-r--r--datastructures/test/lazyPropagation.awk86
1 files changed, 0 insertions, 86 deletions
diff --git a/datastructures/test/lazyPropagation.awk b/datastructures/test/lazyPropagation.awk
deleted file mode 100644
index fc39305..0000000
--- a/datastructures/test/lazyPropagation.awk
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/Neutral element for combine/ {
- print "#ifndef SEGTREE_FIRST_NEG"
- print "# ifndef SEGTREE_MAX"
- print
- print "# else"
- tmp = $0
- sub(/0/, "numeric_limits<T>::min()", tmp)
- print tmp
- print "# endif"
- print "#else"
- sub(/0/, "numeric_limits<T>::max()")
- print
- print "#endif"
- next
-}
-
-/Modify this \+ E/ {
- print "#ifndef SEGTREE_FIRST_NEG"
- print "# ifndef SEGTREE_MAX"
- print
- print "# else"
- tmp = $0
- sub(/a \+ b/, "max(a, b)", tmp)
- print tmp
- print "# endif"
- print "#else"
- sub(/a \+ b/, "a < 0 ? a : min(a, b)")
- print
- print "#endif"
- next
-}
-
-/Unused value by updates/ {
- print "#ifndef SEGTREE_FIRST_NEG"
- print
- print "#else"
- sub(/0/, /numeric_limits<U>::max()/)
- print
- print "#endif"
- next
-}
-
-/And this \+ UF/ {
- print
- getline set_tree
- getline set_lazy
- print "#ifndef SEGTREE_MAX"
- print "# ifndef SEGTREE_FIRST_NEG"
- print set_tree
- print "# else"
- tmp = set_tree
- sub(/val \* k\[i\]/, "val", tmp)
- print tmp
- print "# endif"
- print set_lazy
- print "#else"
- sub(/= val \* k\[i\]/, "+= val", set_tree)
- sub(/= val/, "+= val", set_lazy)
- print set_tree
- print set_lazy
- print "#endif"
- next
-}
-
-/Optional/ { print "#ifdef SEGTREE_MAX" }
-/^\};$/ { print "#endif" }
-
-/SegTree\(const vector<T>& a\)/ {
- print "#ifndef SEGTREE_INIT_DEFAULT"
- print
- print "#else"
- getline
- sub(/\/\//, "")
- print
- print "#endif"
- getline
- print
- print "#ifndef SEGTREE_INIT_DEFAULT"
- getline
- print
- print "#endif"
- next
-}
-
-{ print }