foo.cc: In function 'void init()':
foo.cc:2:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
2 | #define rep(i,s,n) for(int (i)=(s);(i)<=(n);++(i))
| ^
foo.cc:10:5: note: in expansion of macro 'rep'
10 | rep(i,1,m)
| ^~~
foo.cc:2:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
2 | #define rep(i,s,n) for(int (i)=(s);(i)<=(n);++(i))
| ^
foo.cc:17:3: note: in expansion of macro 'rep'
17 | rep(i,1,m+1) w[i]=w[i-1],w[i]+=a[i];
| ^~~
foo.cc:2:28: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
2 | #define rep(i,s,n) for(int (i)=(s);(i)<=(n);++(i))
| ^
foo.cc:19:3: note: in expansion of macro 'rep'
19 | rep(i,1,m+1) s[i][i]=i,dp[i][i]=0;
| ^~~
foo.cc: In function 'int main()':
foo.cc:2:28: warning: unnecessary parentheses in declaration of 'len' [-Wparentheses]
2 | #define rep(i,s,n) for(int (i)=(s);(i)<=(n);++(i))
| ^
foo.cc:24:6: note: in expansion of macro 'rep'
24 | rep(len,2,m+1)
| ^~~
foo.cc:2:28: warning: unnecessary parentheses in declaration of 'l' [-Wparentheses]
2 | #define rep(i,s,n) for(int (i)=(s);(i)<=(n);++(i))
| ^
foo.cc:26:10: note: in expansion of macro 'rep'
26 | rep(l,1,n-len+1)
| ^~~
foo.cc:2:28: warning: unnecessary parentheses in declaration of 'mid' [-Wparentheses]
2 | #define rep(i,s,n) for(int (i)=(s);(i)<=(n);++(i))
| ^
foo.cc:29:14: note: in expansion of macro 'rep'
29 | rep(mid,s[l][r-1],s[l+1][r]) if(dp[l][mid]+dp[mid+1][r]+w[r]-w[l-1]+(len-2)<=dp[l][r])
| ^~~
foo.cc: In function 'void init()':
foo.cc:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
8 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:13:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
13 | scanf("%d",&x);
| ~~~~~^~~~~~~~~
Found 10 testcases.
[Hydro](https://hydro.ac)提供评测服务