sequence.cpp: In member function 'std::pair<long long int, long long int> cht::qry(long long int)':
sequence.cpp:21:28: error: cannot convert 'int' to 'std::pair<long long int, long long int>'
21 | while(s+1<e&&cross(s,s+1)<=x) s++;
| ^
| |
| int
sequence.cpp:14:30: note: initializing argument 1 of 'double cht::cross(std::pair<long long int, long long int>, std::pair<long long int, long long int>)'
14 | double cross(pair<ll,ll> a,pair<ll,ll> b){
| ~~~~~~~~~~~~^
sequence.cpp: In function 'int main()':
sequence.cpp:36:37: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
36 | 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:35:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
35 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
sequence.cpp:36:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
36 | for(int i=1;i<=n;i++) scanf("%lld",arr+i),sum[i]=sum[i-1]+arr[i];
| ~~~~~^~~~~~~~~~~~~~