sequence.cpp: In member function 'void cht::udt(long long int, long long int, int)':
sequence.cpp:26:90: warning: operation on '((cht*)this)->cht::e' may be undefined [-Wsequence-point]
26 | while(s+1<e&&cross(p[e-2],p[e-1])>=cross(p[e-1],p[e])) num[e-1]=num[e],p[e-1]=p[e--];
| ~^~
sequence.cpp: In function 'int main()':
sequence.cpp:33:37: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
33 | for(int i=1;i<=n;i++) scanf("%lld",arr+i),sum[i]=sum[i-1]+arr[i];
| ~~~^ ~~~~~
| | |
| | int*
| long long int*
| %d
sequence.cpp:32:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
32 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
sequence.cpp:33:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
33 | for(int i=1;i<=n;i++) scanf("%lld",arr+i),sum[i]=sum[i-1]+arr[i];
| ~~~~~^~~~~~~~~~~~~~