Overview
SHA1 Hash: | 4db730544297fb6bfe4cc447e18b6f066cfd31b6 |
---|---|
Date: | 2013-12-12 03:04:28 |
User: | kinaba |
Comment: | Simplify Repeat() example. |
Timelines: | family | ancestors | descendants | both | trunk |
Downloads: | Tarball | ZIP archive |
Other Links: | files | file ages | manifest |
Tags And Properties
- branch=trunk inherited from [9165bd3629]
- sym-trunk inherited from [9165bd3629]
Changes
Modified lib/dataStructure/segmentTree.cpp from [b7ca5af5f1eab32a] to [fb4d697dde7b0758].
27 static Node Concat(const Node& l, const Node& r) 27 static Node Concat(const Node& l, const Node& r) 28 { 28 { 29 Node c = {l.sum + r.sum}; 29 Node c = {l.sum + r.sum}; 30 return c; 30 return c; 31 } 31 } 32 static Node Repeat(const Node& n, int k) 32 static Node Repeat(const Node& n, int k) 33 { 33 { 34 if(k==0) return Zero(); < 35 Node c = {n.sum * k}; 34 Node c = {n.sum * k}; 36 return c; 35 return c; 37 } 36 } 38 37 39 bool lazy; 38 bool lazy; 40 }; 39 }; 41 40