示例#1
0
 Range* build(int l, int r) {
   assert(l <= r);
   if (r - l == 1) {
     Range* range = new Range(l, r);
     range->data = RangeData(array[l]);
     return range;
   }
   Range* range = new Range(l, r);
   int m = l + (r - l) / 2;
   range->left  = build(l, m);
   range->right = build(m, r);
   range->data  = range->left->data ^ range->right->data;
   return range;
 }
示例#2
0
 RangeData operator ^ (const RangeData& other) {
   return RangeData(do_gcd(gcd, other.gcd));
 }
示例#3
0
文件: main.cpp 项目: CCJY/coliru
 ByteRange(const uint8_t* b, const uint8_t* e, Refer) : impl(RangeData(b, e)) {}