kas.cpp: In function 'int main()':
kas.cpp:17:27: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
17 | memcpy(dp[i & 1], dp[i & 1 ^ 1], sizeof dp[i & 1]);
| ~~^~~
kas.cpp:19:13: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
19 | if(dp[i & 1 ^ 1][sum] == -1){
| ~~^~~
kas.cpp:23:56: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
23 | dp[i & 1][sum - x] = max(dp[i & 1][sum - x], dp[i & 1 ^ 1][sum] + x);
| ~~^~~
kas.cpp:26:56: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
26 | dp[i & 1][sum + x] = max(dp[i & 1][sum + x], dp[i & 1 ^ 1][sum] + x);
| ~~^~~
kas.cpp:12:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
12 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
kas.cpp:16:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
16 | scanf("%d", &x);
| ~~~~~^~~~~~~~~~