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

Function solve

Dynamic Programming Optimizations/Digit DP.cpp:28–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 return ans;
27}
28int solve(ll n) {
29 if(n == 0) return 0;
30 v.clear();
31 while(n) {
32 v.eb(n % 10);
33 n /= 10;
34 }
35 return yo(v.size() - 1, 0, 0, 1);
36}
37int32_t main() {
38 memset(dp, -1, sizeof dp);
39 for(int i = 1; i < 20; i++) {

Callers 1

mainFunction · 0.70

Calls 3

yoFunction · 0.70
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected