MCPcopy Create free account
hub / github.com/Jonathan-Uy/CSES-Solutions / main

Function main

String Algorithms/Substring Distribution.cpp:73–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73int main(){
74 scanf(" %s", S);
75 N = (int) strlen(S);
76 init();
77
78 for(int i = 0; i < N; i++)
79 extend(S[i]);
80
81 bfs();
82 for(int i = 1; i <= N; i++){
83 ans[i] += ans[i-1];
84 printf("%lld%c", ans[i], (" \n")[i==N]);
85 }
86}

Callers

nothing calls this directly

Calls 3

initFunction · 0.70
extendFunction · 0.70
bfsFunction · 0.70

Tested by

no test coverage detected