segments.c:4:1: warning: data definition has no type or storage class
4 | i,j,n,dp[N];
| ^
segments.c:4:1: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
segments.c:4:3: warning: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
4 | i,j,n,dp[N];
| ^
segments.c:4:5: warning: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
4 | i,j,n,dp[N];
| ^
segments.c:4:7: warning: type defaults to 'int' in declaration of 'dp' [-Wimplicit-int]
4 | i,j,n,dp[N];
| ^~
segments.c:6:1: warning: return type defaults to 'int' [-Wimplicit-int]
6 | u(int p, long long k) { for (;p<N;p+=p&-p) fw[p]-=(fw[p]-k)*(k<fw[p]); }
| ^
segments.c:8:1: warning: return type defaults to 'int' [-Wimplicit-int]
8 | s(){
| ^
segments.c:13:1: warning: return type defaults to 'int' [-Wimplicit-int]
13 | main()
| ^~~~
segments.c: In function 'u':
segments.c:6:72: warning: control reaches end of non-void function [-Wreturn-type]
6 | u(int p, long long k) { for (;p<N;p+=p&-p) fw[p]-=(fw[p]-k)*(k<fw[p]); }
| ^
segments.c: In function 'main':
segments.c:15:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | scanf("%d",&n);for(;++i<N;fw[i]=1e18);
| ^~~~~~~~~~~~~~
segments.c:16:24: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
16 | for (i=1;i<=n;++i) scanf("%lld",a+i),x=a[i]+=a[i-1],dp[i]=1+dp[j=n+1-s(),j>0?j:(j=0)],u(n-i+1,2*a[i]-a[j]);
| ^~~~~~~~~~~~~~~~~