clo.cpp: In function 'int main()':
clo.cpp:41:20: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
dp[i&1][j]=dp[i-1&1][j];
~^~
clo.cpp:42:52: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
if(j-A[i].c>=0) dp[i&1][j]=max(dp[i&1][j], dp[i-1&1][j-A[i].c]+A[i].v);
~^~
clo.cpp:49:20: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
dp[i&1][j]=dp[i-1&1][j];
~^~
clo.cpp:50:57: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
if(j+A[i].c<=100000) dp[i&1][j]=max(dp[i&1][j], dp[i-1&1][j+A[i].c]+A[i].v);
~^~
clo.cpp:55:48: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
for(int i=0; i<=100000; i++) ans=max(ans, dp[N+M&1][i]);
~^~
clo.cpp:22:6: warning: unused variable 'i' [-Wunused-variable]
int i, j;
^
clo.cpp:22:9: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
clo.cpp:23:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &N);
~~~~~^~~~~~~~~~
clo.cpp:24:68: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1; i<=N; i++) scanf("%d%d%d", &A[i].c, &A[i].f, &A[i].v), A[i].v*=-1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
clo.cpp:25:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &M);
~~~~~^~~~~~~~~~
clo.cpp:26:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1; i<=M; i++) scanf("%d%d%d", &A[i+N].c, &A[i+N].f, &A[i+N].v);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~