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

Function pow26

String Algorithms/Required Substring.cpp:12–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10ll ans, dp[maxM][maxN];
11
12ll pow26(ll b){
13 ll a = 26;
14 ll res = 1;
15 while(b){
16 if(b&1) res = (res * a) % MOD;
17 a = (a * a) % MOD;
18 b >>= 1;
19 }
20 return res;
21}
22
23bool good(vector<char> pre, int k){
24 int SZ = (int) pre.size();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected