MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / test

Function test

code/data-structures/sparse_table.test.cpp:14–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12};
13
14void test() {
15 rep(n,0,257) {
16 vi arr(n);
17 rep(i,0,n) arr[i] = rng() % 1000000000;
18
19 sparse_table_slow A(arr);
20 sparse_table B(arr);
21 rep(l,0,n) {
22 rep(r,l+1,n) {
23 assert_equal(A.query(l,r), B.query(l,r), true);
24 }
25 }
26 }
27}

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.50
queryMethod · 0.45

Tested by

no test coverage detected