diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 01:24:14 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 01:24:14 +0100 |
| commit | 98567ec798aa8ca2cfbcb85c774dd470f30e30d4 (patch) | |
| tree | 5113d5cc24d1ad5f93810b6442ce584a36950dc8 /datastructures/test/segmentTree.awk | |
| parent | ad3856a6b766087df0036de0b556f4700a6498c9 (diff) | |
| parent | 8d11c6c8213f46f0fa19826917c255edd5d43cb1 (diff) | |
mzuenni tests
Diffstat (limited to 'datastructures/test/segmentTree.awk')
| -rw-r--r-- | datastructures/test/segmentTree.awk | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/datastructures/test/segmentTree.awk b/datastructures/test/segmentTree.awk deleted file mode 100644 index e863d4e..0000000 --- a/datastructures/test/segmentTree.awk +++ /dev/null @@ -1,74 +0,0 @@ - -/Neutral element for combine/ { - print "#ifndef SEGTREE_MUL" - print "# ifndef SEGTREE_FIRST_NEG" - print - print "# else" - tmp = $0 - sub(/0/, "numeric_limits<ll>::max()", tmp) - print tmp - print "# endif" - print "#else" - sub(/0/, "1") - print - print "#endif" - next -} - -/modify this \+ neutral/ { - print "#ifndef SEGTREE_MUL" - print "# ifndef SEGTREE_FIRST_NEG" - print - print "# else" - tmp = $0 - sub(/a \+ b/, "a < 0 ? a : min(a, b)", tmp) - print tmp - print "# endif" - print "#else" - sub(/a \+ b/, "a*b % MOD") - print - print "#endif" - next -} - -/SegTree\(vector<T>& a\)/ { - print "#ifndef SEGTREE_INIT_DEFAULT" - print - getline - print - print "#else" - getline - sub(/\/\//, "") - print - getline - sub(/\/\//, "") - print - print "#endif" - next -} - -/remove for range update/ { - print "#ifndef SEGTREE_RANGE_UPDATE" - print - getline - print - getline - print "\t\t}" - print "#endif" - print "\t}" - next -} - -/void update/ { - print "#ifndef SEGTREE_RANGE_UPDATE" -} - -/OR: range update/ { - print "#else" -} - -/^\};$/ { - print "#endif" -} - -{ print } |
