MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / main

Function main

Data Structures/Sparse Table.cpp:21–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21int32_t main() {
22 ios_base::sync_with_stdio(0);
23 cin.tie(0);
24
25 int n;
26 cin >> n;
27 for(int i = 1; i <= n; i++) cin >> a[i];
28 build(n);
29 int q;
30 cin >> q;
31 while(q--) {
32 int l, r;
33 cin >> l >> r;
34 ++l;
35 ++r;
36 cout << query(l, r) << '\n';
37 }
38 return 0;
39}

Callers

nothing calls this directly

Calls 2

buildFunction · 0.70
queryFunction · 0.70

Tested by

no test coverage detected