File: expl-26.cpp

package info (click to toggle)
libsdsl 2.1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 3,980 kB
  • sloc: cpp: 42,286; makefile: 1,171; ansic: 318; sh: 201; python: 27
file content (15 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <sdsl/rmq_support.hpp>
#include <iostream>

using namespace std;
using namespace sdsl;

int main()
{
    //                0 1 2 3 4 5 6 7 8 9 0
    int_vector<> v = {5,3,8,9,1,2,5,3,9,0,7};
    rmq_succinct_sct<> rmq(&v); // <- pointer to b
    util::clear(v);
    cout << "v.size() = " << v.size() << endl;
    cout << rmq(0, 10) << ", " << rmq(2, 7) << endl;
}