MCPcopy Create free account
hub / github.com/LeadCoding/3-weeks-Google-Prep / main

Function main

02. Dynamic Programming/1. Barcode.cpp:31–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30}
31int32_t main() {
32 int n,m,x,y;
33
34 cin>>n>>m>>x>>y;
35 vector<int> v(m,0);
36 for(int i=0;i<n;i++) {
37 for(int j=0;j<m;j++) {
38 char c;
39 cin>>c;
40 if(c=='#') v[j]++;
41 }
42 }
43 int dp[1001][1001][2];
44 for(int i=0;i<1001;i++) {
45 for(int j=0;j<1001;j++) {
46 dp[i][j][0]=-1;
47 dp[i][j][1]=-1;
48 }
49 }
50 cout<<help(0,1,0,v,x,y,n,dp);
51
52}

Callers

nothing calls this directly

Calls 1

helpFunction · 0.85

Tested by

no test coverage detected