Main.cpp: In function 'bool f(int, int, int)':
Main.cpp:25:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
25 | if(f(l + 2, r, red + (s[l] == 'C')) && f(l + 1, r - 1, red + (s[l] == 'C'))) return dp[l][r][red] = 1;
| ~~~~~~~~~~~~~~^~~
Main.cpp:27:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
27 | if(f(l, r - 2, red + (s[r] == 'C')) && f(l + 1, r - 1, red + (s[r] == 'C'))) return dp[l][r][red] = 1;
| ~~~~~~~~~~~~~~^~~
Main.cpp:29:26: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
29 | return dp[l][r][red] = 0;
| ~~~~~~~~~~~~~~^~~
Main.cpp:18:52: warning: array subscript 351 is above array bounds of 'int [351]' [-Warray-bounds]
18 | if(dp[l][r][red] != -1) return dp[MAX][MAX][MAX];
| ~~~~~~~~~~~~~~~~^
Main.cpp:18:42: warning: array subscript 351 is above array bounds of 'int [351][351][351]' [-Warray-bounds]
18 | if(dp[l][r][red] != -1) return dp[MAX][MAX][MAX];
| ~~~~~~^
Main.cpp:15:5: note: while referencing 'dp'
15 | int dp[MAX][MAX][MAX];
| ^~