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

Function main

String Algorithms/Substring Order II.cpp:85–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85int main(){
86 scanf(" %s %lld", S, &K);
87 N = (int) strlen(S);
88
89 init();
90 for(int i = 0; i < N; i++)
91 extend(S[i]);
92 update_cnts();
93 calc();
94
95 dfs(0, K-1);
96 int M = (int) ans.size();
97 for(int i = 0; i < M; i++)
98 printf("%c", ans[i]);
99 printf("\n");
100}

Callers

nothing calls this directly

Calls 5

initFunction · 0.70
extendFunction · 0.70
update_cntsFunction · 0.70
calcFunction · 0.70
dfsFunction · 0.70

Tested by

no test coverage detected