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

Function main

String Algorithms/Counting Patterns.cpp:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71int main(){
72 scanf(" %s %d", S, &K);
73 N = (int) strlen(S);
74
75 init();
76 for(int i = 0; i < N; i++)
77 extend(S[i]);
78 update_cnts();
79
80 for(int i = 0; i < K; i++){
81 scanf(" %s", T);
82 M = (int) strlen(T);
83 printf("%d\n", query());
84 }
85}

Callers

nothing calls this directly

Calls 4

initFunction · 0.70
extendFunction · 0.70
update_cntsFunction · 0.70
queryFunction · 0.70

Tested by

no test coverage detected