foo.cpp: In function 'int main()':
foo.cpp:11:26: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
while ( ch = getchar() )
^
foo.cpp:49:34: error: 'abs' was not declared in this scope
while ( abs(cnt1-cnt2) == 2 )
^
foo.cpp:57:31: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if ( flag==0&&i!=len-1&&cnt1==11||cnt2==11 )
^
foo.cpp:62:42: error: 'abs' was not declared in this scope
else if ( flag==1&&(abs(cnt1-cnt2)==2) )
^
foo.cpp:88:22: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if ( i!=len-1&&cnt1==21||cnt2==21 )
^
foo.cpp:33:9: warning: unused variable 'ans1' [-Wunused-variable]
int ans1 = 0, ans2 = 0;
^
foo.cpp:33:19: warning: unused variable 'ans2' [-Wunused-variable]
int ans1 = 0, ans2 = 0;
^