Guest User

Untitled

a guest
May 8th, 2011
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. template<typename T> struct Max {
  2. T operator()(const T &a, const T &b) const {
  3. return a > b ? a : b;
  4. }
  5. };
  6.  
  7. template<typename T, typename Func> SegmentsTree {
  8. // ...
  9. tr[x] = Func()(tr[x * 2], tr[x * 2 + 1]);
  10. // ...
  11. };
Advertisement
Add Comment
Please, Sign In to add comment