friend.cpp: In function 'int ans(int)':
friend.cpp:5:18: error: 'int ans(int)' redeclared as different kind of symbol
int ans(int state)
^
friend.cpp:4:48: note: previous declaration 'int ans [11000]'
int c[100100],h[100100],p[100100],edge[12][12],ans[11000];
^~~
friend.cpp:7:9: error: 'dp' was not declared in this scope
if(!dp[state])
^~
friend.cpp:7:9: note: suggested alternative: 'p'
if(!dp[state])
^~
p
friend.cpp:10:19: error: 'n' was not declared in this scope
for(int i=0;i<n;i++)
^
friend.cpp:13:19: error: 'n' was not declared in this scope
for(int i=0;i<n;i++)
^
friend.cpp:22:41: error: 'ans' cannot be used as a function
ret=max(ret,ans(state|(1<<i)));
^
friend.cpp:24:5: error: 'dp' was not declared in this scope
dp[state]=ret;
^~
friend.cpp:24:5: note: suggested alternative: 'p'
dp[state]=ret;
^~
p
friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:46:16: error: 'ans' cannot be used as a function
cout<<ans(0);
^
friend.cpp:47:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^