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

Method query

Data Structures/4D MO.cpp:27–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 cc[x / B][c[x]]++;
26 }
27 int query() {
28 int mx_oc = 0;
29 for (int i = 0; i <= N / B; i++) {
30 mx_oc = max(mx_oc, mx[i]);
31 }
32 for (int i = 0; i <= N / B; i++) {
33 if (mx[i] == mx_oc) {
34 for (int j = 0; j < B; j++) {
35 if (c[i * B + j] == mx_oc) {
36 return i * B + j;
37 }
38 }
39 assert(0);
40 }
41 }
42 return 0;
43 }
44};
45
46const int B = 5000;

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected