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

Method cnt

Strings/Suffix Automaton.cpp:82–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 build_tree();
81 }
82 long long cnt(int i) { //number of times i-th node occurs in the string
83 if (dp[i] != -1) return dp[i];
84 long long ret = terminal[i];
85 for (auto &x: g[i]) ret += cnt(x);
86 return dp[i] = ret;
87 }
88};
89
90int32_t main() {

Callers

nothing calls this directly

Calls 1

cntFunction · 0.85

Tested by

no test coverage detected